Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 932348 - prefix: stage3 circular dependencies (dev-lang/perl) when emerging coreutils
Summary: prefix: stage3 circular dependencies (dev-lang/perl) when emerging coreutils
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-05-21 07:18 UTC by Matt Jolly
Modified: 2024-05-28 01:00 UTC (History)
3 users (show)

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


Attachments
stage3.log.zst (stage3.log.zst,984.38 KB, application/zstd)
2024-05-21 07:18 UTC, Matt Jolly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Jolly gentoo-dev 2024-05-21 07:18:33 UTC
Created attachment 893627 [details]
stage3.log.zst

in a fresh prefix-bootstrap run into a clean directory, I encountered the following when attempting to emerge coreutils into the stage3 (`pre_emerge_pkgs`):

```
(dev-lang/perl-5.38.2-r5:0/5.38::gentoo, ebuild scheduled for merge) depends on
 (app-admin/perl-cleaner-2.31-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)
  (sys-apps/portage-3.0.64-r2:0/0::gentoo, ebuild scheduled for merge) (runtime)
   (app-admin/eselect-1.4.27-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)
    (sys-apps/coreutils-9.5:0/0::gentoo, ebuild scheduled for merge) (buildtime)
     (dev-lang/perl-5.38.2-r5:0/5.38::gentoo, ebuild scheduled for merge) (buildtime)

It might be possible to break this cycle
by applying any of the following changes:
- app-admin/perl-cleaner-2.31-r1 (Change USE: +pkgcore)
- sys-apps/portage-3.0.64-r2 (Change USE: +build)
```
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-21 13:10:17 UTC
Is this with LATEST_TREE_YES=1 and ~arch (not stable)? I'm wondering if this is caused, or fixed, by the changes I made to perl recently.
Comment 2 Matt Jolly gentoo-dev 2024-05-21 23:18:30 UTC
(In reply to Sam James from comment #1)
> Is this with LATEST_TREE_YES=1 and ~arch (not stable)? I'm wondering if this
> is caused, or fixed, by the changes I made to perl recently.

I haven't tried with LATEST_TREE_YES (will report back later today if it's different), but I am attempting to build ~arch/testing.
Comment 3 Matt Jolly gentoo-dev 2024-05-22 04:49:11 UTC
I was able to proceed by removing:

- PDEPEND (perl-cleaner -> perl)
- IDEPEND  (perl -> perl-cleaner)

The PDEPEND removal alone was not enough to enable me to proceed; this is obviously not sustainable, further investigation required.

It only takes about 30 mins to bootstrap to this point so I am happy to test any potential solutions.
Comment 4 Matt Jolly gentoo-dev 2024-05-24 05:19:23 UTC
Status:

No changes to current master:

```
(dev-lang/perl-5.38.2-r5:0/5.38::gentoo, ebuild scheduled for merge) depends on
 (app-admin/perl-cleaner-2.31-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)
  (sys-apps/portage-3.0.64-r2:0/0::gentoo, ebuild scheduled for merge) (runtime)
   (app-admin/eselect-1.4.27-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)
    (sys-apps/coreutils-9.5:0/0::gentoo, ebuild scheduled for merge) (buildtime)
     (dev-lang/perl-5.38.2-r5:0/5.38::gentoo, ebuild scheduled for merge) (buildtime)

It might be possible to break this cycle
by applying any of the following changes:
- app-admin/perl-cleaner-2.31-r1 (Change USE: +pkgcore)
- sys-apps/portage-3.0.64-r2 (Change USE: +build)
```

Remove `PDEPEND="dev-lang/perl"` from app-admin/perl-cleaner:

```
(dev-lang/perl-5.38.2-r5:0/5.38::gentoo, ebuild scheduled for merge) depends on
 (app-admin/perl-cleaner-2.31-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)
  (sys-apps/portage-3.0.64-r2:0/0::gentoo, ebuild scheduled for merge) (runtime)
   (app-admin/eselect-1.4.27-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)
    (sys-apps/coreutils-9.5:0/0::gentoo, ebuild scheduled for merge) (buildtime)
     (dev-lang/perl-5.38.2-r5:0/5.38::gentoo, ebuild scheduled for merge) (buildtime)

```

So perl-cleaner still has an indirect dependency on perl via:


```
       !pkgcore? (
                app-portage/portage-utils
                sys-apps/portage
```


This appears to be the result of the following commits:

- https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00aadd9b5059a0675edb18cbb3278059b987ed24
- https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe38b09da732bbee5c7cf411852b04eb76ebb40f

Reverting both changes has left me able to proceed with my installation. These will both need to be reverted.
Comment 5 Larry the Git Cow gentoo-dev 2024-05-28 00:57:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32499b48da6ebacee94f4c84e49a145beb681d11

commit 32499b48da6ebacee94f4c84e49a145beb681d11
Author:     Matt Jolly <kangie@gentoo.org>
AuthorDate: 2024-05-26 01:52:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-28 00:56:36 +0000

    app-admin/perl-cleaner: dev-lang/perl from PDEPEND -> RDEPEND
    
    This commit effectively reverts 00aadd9b5059a0675edb18cbb3278059b987ed24 as
    the combination of that change with
    fe38b09da732bbee5c7cf411852b04eb76ebb40f's changes to dev-lang/perl's
    dependencies result in circular dependencies in prefix.
    
    ```
    (dev-lang/perl-5.38.2-r5:0/5.38::gentoo, ebuild scheduled for merge) depends on
     (app-admin/perl-cleaner-2.31-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)
      (sys-apps/portage-3.0.64-r2:0/0::gentoo, ebuild scheduled for merge) (runtime)
       (app-admin/eselect-1.4.27-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)
        (sys-apps/coreutils-9.5:0/0::gentoo, ebuild scheduled for merge) (buildtime)
         (dev-lang/perl-5.38.2-r5:0/5.38::gentoo, ebuild scheduled for merge) (buildtime)
    ```
    
    [sam: Added some detail to commit message, revbumped too.]
    
    Bug: https://bugs.gentoo.org/932348
    Bug: https://bugs.gentoo.org/905625
    Bug: https://bugs.gentoo.org/915046
    Signed-off-by: Matt Jolly <kangie@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/36818
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{perl-cleaner-2.31-r1.ebuild => perl-cleaner-2.31-r2.ebuild}        | 2 +-
 app-admin/perl-cleaner/perl-cleaner-9999.ebuild                         | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52013a947b62f88873a924a8cd7adb69af66c3b9

commit 52013a947b62f88873a924a8cd7adb69af66c3b9
Author:     Matt Jolly <kangie@gentoo.org>
AuthorDate: 2024-05-26 01:46:34 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-28 00:54:21 +0000

    dev-lang/perl: PDEPEND on perl-cleaner if USE !minimal
    
    This change effectively reverts fe38b09da732bbee5c7cf411852b04eb76ebb40f
    as the combination of moving perl-cleaner to IDEPEND after this
    and 00aadd9b5059a0675edb18cbb3278059b987ed24 moving
    dev-lang/perl from RDEPEND -> PDEPEND in perl-cleaner results in circular dependencies.
    
    ```
    (dev-lang/perl-5.38.2-r5:0/5.38::gentoo, ebuild scheduled for merge) depends on
     (app-admin/perl-cleaner-2.31-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)
      (sys-apps/portage-3.0.64-r2:0/0::gentoo, ebuild scheduled for merge) (runtime)
       (app-admin/eselect-1.4.27-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)
        (sys-apps/coreutils-9.5:0/0::gentoo, ebuild scheduled for merge) (buildtime)
         (dev-lang/perl-5.38.2-r5:0/5.38::gentoo, ebuild scheduled for merge) (buildtime)
    
    It might be possible to break this cycle
    by applying any of the following changes:
    - app-admin/perl-cleaner-2.31-r1 (Change USE: +pkgcore)
    - sys-apps/portage-3.0.64-r2 (Change USE: +build)
    ```
    
    [sam: Added some detail to commit message, revbumped too.]
    
    Bug: https://bugs.gentoo.org/932348
    Bug: https://bugs.gentoo.org/905625
    Bug: https://bugs.gentoo.org/915046
    Signed-off-by: Matt Jolly <kangie@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/perl/perl-5.38.2-r6.ebuild                | 865 +++++++++++++++++++++
 ...5.40.0_rc1.ebuild => perl-5.40.0_rc1-r1.ebuild} |   3 +-
 2 files changed, 867 insertions(+), 1 deletion(-)