Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911180 - emerge should warn if world file has packages with no ebuilds
Summary: emerge should warn if world file has packages with no ebuilds
Status: IN_PROGRESS
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-07-25 04:02 UTC by Sam James
Modified: 2024-02-28 15:59 UTC (History)
4 users (show)

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


Attachments
hack.patch (file_911180.txt,475 bytes, patch)
2023-07-25 04:05 UTC, Sam James
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-25 04:02:36 UTC
This is mostly the same as bug 760783 (see also its huge list of See Also bugs), but I'd like this one to have very narrow scope: something with no ebuild available in @selected or @world file.

I think we need to revisit some of the "friendly" behaviour chosen in the past now that we have slot rebuilds.

The pattern is something like:
- User has years' worth of junk in their world file (/var/lib/portage/world)
- One or more of those packages get removed from the tree
- One of those packages bar has a := dep on libfoo
- libfoo changes its subslot one day
- bar can't be rebuilt and leads to confusing world upgrade output

I tend to recommend people try 'emerge -pev @world --backtrack=0' to find these, but they shouldn't have to.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-25 04:05:59 UTC
Created attachment 866174 [details, diff]
hack.patch

Not going to use the attached patch, but it leads to the rightish outcome:

```
emerge: there are no ebuilds to satisfy "app-misc/i-do-not-exist".
(dependency required by "@selected" [set])
(dependency required by "@world" [argument])
```

but I'd prefer something like this instead, reusing the existing message which doesn't get triggered for this case:
```

!!! Problems have been detected with your world file
!!! Please run emaint --check world


!!! Ebuilds for the following packages are either all
!!! masked or don't exist:
app-misc/foo
```

I'm aiming for ^^.

(With no patches, we get absolutely no output for this.)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-25 04:07:02 UTC
(In reply to Sam James from comment #0)
> This is mostly the same as bug 760783 (see also its huge list of See Also
> bugs), but I'd like this one to have very narrow scope: something with no
> ebuild available in @selected or @world file.
> 
> I think we need to revisit some of the "friendly" behaviour chosen in the
> past now that we have slot rebuilds.
> 
> The pattern is something like:
> - User has years' worth of junk in their world file (/var/lib/portage/world)
> - One or more of those packages get removed from the tree
> - One of those packages bar has a := dep on libfoo
> - libfoo changes its subslot one day
> - bar can't be rebuilt and leads to confusing world upgrade output
> 

Ah, sorry, I should've added:
- Users think Gentoo is "much harder" now with "tonnes of conflicts" because 15 years ago, Portage would happily let installed packages get broken in this case. :)
Comment 3 Pacho Ramos gentoo-dev 2023-07-25 11:39:58 UTC
Currently I rely on a message from eclean-dist warning about exactly the same issue... I am not sure if its check could be borrowed from there to get a similar warning at world update stage :/

I think its check resides in pym/gentoolkit/package.py from gentoolkit under the format_package_location section