Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 592880 (Locale-gettext) - sys-apps/help2man dependents don't trigger dev-perl/Locale-gettext rebuilds during perl upgrade
Summary: sys-apps/help2man dependents don't trigger dev-perl/Locale-gettext rebuilds d...
Status: CONFIRMED
Alias: Locale-gettext
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
: 552194 556752 559660 592102 592554 592850 593350 616116 660744 689696 782058 802144 834609 857129 887199 915794 923646 (view as bug list)
Depends on: 907949
Blocks: 645210 build-order 835002
  Show dependency tree
 
Reported: 2016-09-04 15:56 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2024-04-20 20:33 UTC (History)
18 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-09-04 15:56:34 UTC
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.
Comment 1 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-09-04 15:57:06 UTC
*** Bug 592102 has been marked as a duplicate of this bug. ***
Comment 2 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-09-04 15:58:04 UTC
*** Bug 592850 has been marked as a duplicate of this bug. ***
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-09-04 16:02:45 UTC
*** Bug 556752 has been marked as a duplicate of this bug. ***
Comment 4 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-09-04 16:03:59 UTC
*** Bug 559660 has been marked as a duplicate of this bug. ***
Comment 5 Mike Gilbert gentoo-dev 2016-09-04 16:04:23 UTC
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.
Comment 6 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-09-04 16:07:39 UTC
*** Bug 552194 has been marked as a duplicate of this bug. ***
Comment 7 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-09-04 16:11:49 UTC
*** Bug 592554 has been marked as a duplicate of this bug. ***
Comment 8 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-09-04 16:29:55 UTC
(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.
Comment 9 Mike Gilbert gentoo-dev 2016-09-04 17:09:36 UTC
(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.
Comment 10 Zac Medico gentoo-dev 2016-09-04 18:58:08 UTC
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.
Comment 11 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-09-10 07:40:53 UTC
*** Bug 593350 has been marked as a duplicate of this bug. ***
Comment 12 Andreas K. Hüttel archtester gentoo-dev 2017-04-20 16:54:36 UTC
*** Bug 616116 has been marked as a duplicate of this bug. ***
Comment 13 Mike Gilbert gentoo-dev 2017-11-23 17:29:35 UTC
*** Bug 637924 has been marked as a duplicate of this bug. ***
Comment 14 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2018-07-08 22:34:28 UTC
*** Bug 660744 has been marked as a duplicate of this bug. ***
Comment 15 Mike Gilbert gentoo-dev 2019-07-11 21:01:48 UTC
*** Bug 689696 has been marked as a duplicate of this bug. ***
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-04-11 16:44:13 UTC
*** Bug 782058 has been marked as a duplicate of this bug. ***
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-17 23:32:40 UTC
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
Comment 18 Mike Gilbert gentoo-dev 2021-07-14 15:23:44 UTC
*** Bug 802144 has been marked as a duplicate of this bug. ***
Comment 19 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-12 03:37:52 UTC
*** Bug 834609 has been marked as a duplicate of this bug. ***
Comment 20 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-12 03:37:58 UTC
*** Bug 835002 has been marked as a duplicate of this bug. ***
Comment 21 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-20 00:13:54 UTC
*** Bug 857129 has been marked as a duplicate of this bug. ***
Comment 22 Larry the Git Cow gentoo-dev 2023-06-16 03:34:53 UTC
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(+)
Comment 23 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-21 19:13:35 UTC
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>
Comment 24 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-25 07:12:14 UTC
*** Bug 887199 has been marked as a duplicate of this bug. ***
Comment 25 Mike Gilbert gentoo-dev 2024-02-02 21:34:34 UTC
*** Bug 923646 has been marked as a duplicate of this bug. ***
Comment 26 Mike Gilbert gentoo-dev 2024-02-02 21:35:26 UTC
Reopening since this seems to still be an issue.
Comment 27 Mart Raudsepp gentoo-dev 2024-04-20 20:33:45 UTC
*** Bug 915794 has been marked as a duplicate of this bug. ***