Given the following dependency graph: X -> help2man[nls] -> dev-perl/Locale-gettext -> perl People upgrade perl from 5.20 to 5.22 or 5.22 to 5.24 Upgrading perl from 5.22 to 5.24 makes Locale-gettext "transiently uninstalled", and as such, nothing that depends on it ( help2man ) can be used until it is reinstalled. Locale-gettext will continue to be considered "uninstalled" ( and help2man is thus broken ) until either portage's SLOT REBUILD percolates, or the user manually resolves the problem with perl-cleaner. However, SLOT REBUILD clearly doesn't percolate regularly enough to avoid problems with installed packages, as people regularly are entering circumstances where they end up building X before help2man works again, because SLOT REBUILD for Locale-gettext is scheduled, but help2man is *not*, and Locale-gettext is scheduled too late to be useful. I suspect Portage considers help2man "working", because its installed, so the subgraph X -> help2man May be considered "satisfied", despite the fact help2man is secretly broken, and portage can't tell. Traditionally, the answer here has been "suck it users, run perl cleaner and try again", but given we have slot rebuilds, and given this problem is a noteable issue that affects not *just* help2man, but everything like it, we need a better solution.
*** Bug 592102 has been marked as a duplicate of this bug. ***
*** Bug 592850 has been marked as a duplicate of this bug. ***
*** Bug 556752 has been marked as a duplicate of this bug. ***
*** Bug 559660 has been marked as a duplicate of this bug. ***
I wonder if this is related to the --with-bdeps option of emerge? By default, portage does not include DEPEND when computing the set of packages for a @world upgrade. It only gets considered if the requirements are not already met by an installed package. That means help2man doesn't get pulled into the depgraph by default.
*** Bug 552194 has been marked as a duplicate of this bug. ***
*** Bug 592554 has been marked as a duplicate of this bug. ***
(In reply to Mike Gilbert from comment #5) > I wonder if this is related to the --with-bdeps option of emerge? > > By default, portage does not include DEPEND when computing the set of > packages for a @world upgrade. It only gets considered if the requirements > are not already met by an installed package. That means help2man doesn't get > pulled into the depgraph by default. How is that relevant? help2man RDEPENDS on Locale-gettext ( and DEPEND=RDEPEND ) In an example failure case bug #592850, libmp4v2 is selected for recompile. libmp4v2 states it needs help2man for DEPEND So by extension of logic: - help2man is required - all of help2man's RDEPEND's are required - one of help2man's RDEPEND's is deemed "broken" by way of subslot missmatch - therefor help2man's RDEPENDS are deemed unsatisfied - therefor libmp4v2 should not be compiling. Unless of course, whoever implemented the logic assumed subslot missmatches would continue to work due to pkg-preserved, and assumed it was ok to build stuff known to be broken... But that would only be a fine assumption with C dependencies, and only on PMSs with pkg-preserve, really doesn't work for Perl.
(In reply to Kent Fredric (IRC: kent\n) from comment #8) > How is that relevant? It's a guess, based on prior experience when using portage. I would suggest you ask zmedico about it.
This is probably a form of bug 199856, and bug 463976 is a related issue that makes the problem worse when circular dependencies are involved.
*** Bug 593350 has been marked as a duplicate of this bug. ***
*** Bug 616116 has been marked as a duplicate of this bug. ***
*** Bug 637924 has been marked as a duplicate of this bug. ***
*** Bug 660744 has been marked as a duplicate of this bug. ***
*** Bug 689696 has been marked as a duplicate of this bug. ***
*** Bug 782058 has been marked as a duplicate of this bug. ***
Edited for brevity: [01:41:33] <sam_> dilfridge: but I'm wondering if it's worth some hack like grepping for 'Locale::gettext' or the full error string in build logs and suggesting the user run perl-cleaner --all if present [01:41:40] <sam_> because this seems to be happening a lot more frequently at the moment [01:59:02] <sam_> longer string is better to avoid false positives but we can probably some up with something [01:59:14] <sam_> I appreciate it's a pretty gross bandaid [01:59:40] <sam_> It's just that as a user, I'm not sure it's obvious what to do if you hit it [01:59:53] <dilfridge> it's absolutely non-obvious [02:00:01] <dilfridge> unless you've seen the bug a dozen times [02:00:04] <zmedico> what's the problem? [02:00:35] <sam_> quite a few people (more than usual) seem to be hitting bug 782058 [02:00:58] <sam_> in this case, someone was just building grub and had it, but we've had quite a few bug reports recently [02:02:30] <sam_> http://ix.io/3n3p [02:04:36] <zmedico> if you have an update with slot operator rebuilds, then that triggers it, as usual for things that block bug 689644 [02:05:10] <zmedico> and bug 756199 would be the lowest hanging fruit in this area
*** Bug 802144 has been marked as a duplicate of this bug. ***
*** Bug 834609 has been marked as a duplicate of this bug. ***
*** Bug 835002 has been marked as a duplicate of this bug. ***
*** Bug 857129 has been marked as a duplicate of this bug. ***
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=224207c7d1988a354d004507bb7ecfb90b4ef097 commit 224207c7d1988a354d004507bb7ecfb90b4ef097 Author: YiFei Zhu <zhuyifei1999@gmail.com> AuthorDate: 2023-06-13 00:47:52 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-06-16 03:34:46 +0000 depgraph: Do not allow slotted deps to be satisfied by wrong slots This may be part of what caused the "perl rebuild bug". The "priority" of perl, when seen by perl modules, may have "satisfied" set to an installed perl of a wrong slot. Compounding this factor with bug #756199 where find_smallest_cycle would select a single node, in this case because the dependency of perl is satisfied and the priority then gets ignored, the "cycle" becomes a perl module alone and gets rebuilt early. I also updated the test from the previous patch to account for this change. No other tests seems affected. For a larger scale test, I reproduced this initially with a stage3 chroot from a Jan 1 2022 stage3 snapshot, and testing in an equivalent dockerfile would work too: FROM gentoo/stage3:amd64-openrc-20220101 RUN emerge-webrsync COPY . /portage Before this patch (USE flags omitted): # cd /portage && bin/emerge -puDN @world 2>&1 | grep -i perl [ebuild U ] app-admin/perl-cleaner-2.30-r1 [2.30] [ebuild rR ] virtual/perl-File-Temp-0.231.100 [ebuild rR ] dev-perl/Locale-gettext-1.70.0-r1 [ebuild rR ] dev-perl/MIME-Charset-1.12.2-r1 [ebuild rR ] dev-perl/Module-Build-0.423.100 [ebuild rR ] dev-perl/Text-CharWidth-0.40.0-r2 [ebuild U ] dev-lang/perl-5.36.0-r2 [5.34.0-r3] [ebuild N ] virtual/perl-CPAN-2.330.0 [ebuild U ] virtual/perl-ExtUtils-MakeMaker-7.640.0 [7.620.0] [ebuild U ] virtual/perl-File-Spec-3.840.0 [3.800.0] [...] After this patch: # cd /portage && bin/emerge -puDN @world 2>&1 | grep -i perl [ebuild U ] app-admin/perl-cleaner-2.30-r1 [2.30] [ebuild U ] dev-lang/perl-5.36.0-r2:0/5.36 [5.34.0-r3:0/5.34] [ebuild N ] virtual/perl-CPAN-2.330.0 [ebuild U ] virtual/perl-ExtUtils-MakeMaker-7.640.0 [7.620.0] [ebuild U ] virtual/perl-Data-Dumper-2.184.0 [2.179.0] [ebuild U ] virtual/perl-File-Spec-3.840.0 [3.800.0] [ebuild U ] virtual/perl-Test-Harness-3.440.0-r1 [3.430.0] [ebuild rR ] dev-perl/Pod-Parser-1.630.0-r1 [ebuild rR ] dev-perl/Text-CharWidth-0.40.0-r2 [ebuild rR ] dev-perl/Text-WrapI18N-0.60.0-r2 [...] Bug: https://bugs.gentoo.org/463976 Bug: https://bugs.gentoo.org/592880 Bug: https://bugs.gentoo.org/596664 Bug: https://bugs.gentoo.org/631490 Bug: https://bugs.gentoo.org/764365 Bug: https://bugs.gentoo.org/793992 Signed-off-by: YiFei Zhu <zhuyifei1999@gmail.com> Closes: https://github.com/gentoo/portage/pull/1055 Signed-off-by: Sam James <sam@gentoo.org> lib/_emerge/depgraph.py | 18 ++++++++++++++++++ lib/portage/tests/resolver/test_perl_rebuild_bug.py | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) https://gitweb.gentoo.org/proj/portage.git/commit/?id=ff457f742b513a65e6609054e5310f8beee488ec commit ff457f742b513a65e6609054e5310f8beee488ec Author: YiFei Zhu <zhuyifei1999@gmail.com> AuthorDate: 2023-06-13 08:08:51 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-06-16 03:34:46 +0000 tests: resolver: Test the broken behavior of Perl rebuild bug Bug: https://bugs.gentoo.org/463976 Bug: https://bugs.gentoo.org/592880 Bug: https://bugs.gentoo.org/596664 Bug: https://bugs.gentoo.org/631490 Bug: https://bugs.gentoo.org/764365 Bug: https://bugs.gentoo.org/793992 Signed-off-by: YiFei Zhu <zhuyifei1999@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> .../tests/resolver/test_perl_rebuild_bug.py | 121 +++++++++++++++++++++ 1 file changed, 121 insertions(+)
commit 9502761c5bef818dbec90f062909d46dc22289df (HEAD -> master, origin/master, origin/HEAD) Author: Sam James <sam@gentoo.org> Date: Wed Jun 21 20:09:31 2023 +0100 sys-apps/portage: add 3.0.49 Closes: https://bugs.gentoo.org/485100 Cloess: https://bugs.gentoo.org/592880 Closes: https://bugs.gentoo.org/596664 Closes: https://bugs.gentoo.org/631490 Closes: https://bugs.gentoo.org/764365 Closes: https://bugs.gentoo.org/793992 Closes: https://bugs.gentoo.org/890812 Closes: https://bugs.gentoo.org/905660 Closes: https://bugs.gentoo.org/907949 Signed-off-by: Sam James <sam@gentoo.org>
*** Bug 887199 has been marked as a duplicate of this bug. ***
*** Bug 923646 has been marked as a duplicate of this bug. ***
Reopening since this seems to still be an issue.
*** Bug 915794 has been marked as a duplicate of this bug. ***
*** Bug 930926 has been marked as a duplicate of this bug. ***
*** Bug 933766 has been marked as a duplicate of this bug. ***
*** Bug 930789 has been marked as a duplicate of this bug. ***
*** Bug 934069 has been marked as a duplicate of this bug. ***