On Wednesday, 30 July 2025 09:27:29 British Summer Time Philip Webb wrote:
> 250729 Eli Schwartz wrote:
> > On 7/27/25 6:46 AM, Philip Webb wrote:
> >> I've run into this before, eg re sound, but not so severely.
> >> It's a defect in Portage, which no-one seems to want to acknowledge :
> >> it will happily update a pkg without including its vital requirements.
> > 
> > I think that shouldn't be able to happen except when using --oneshot,
> > or at least all the times I can recall seeing this were in such a case,
> > because Portage allows uninstalling or upgrading a package
> > to break another installed package
> > iff that other package is eligible for --depclean.
> > But that is why you're advised to regularly do a full world update
> > followed by depclean.
> 
> I regularly use '-1' when emerging, but have never been aware
> that that caused significantly different behaviour in itself.
> in this case, 'clementine' is in my 'world' file.

The purpose of --oneshot is explained in 'man emerge', along with a warning 
which Eli has pointed at:
=======================
 --oneshot, -1
        Emerge as normal, but do not add the packages to the world file for 
later updating.

        WARNING:  This option should only be used for packages that are 
reachable from the @world package set (those that would not be removed by --
depclean), since dependencies of unreachable packages  are  allowed  to be 
broken when satisfying dependencies of other packages.  Broken dependencies of 
this sort will invalidate assumptions that make it possible for --deep to be 
disabled by default.
====================

I only use '-1' to temporarily emerge a package when I'm testing things and do 
not want a package to be inadvertently added to my world file.  This is 
particularly useful when I install some library, try a new package slot and so 
on.  Later on --depclean will remove it along with any build and run time 
dependencies which were dragged in.  This allows me to keep the contents of 
world clean as well as removing any unnecessary dependencies shrapnel from my 
system.


> As I see it, Portage allowed 'clementine' to be updated,
> while failing to insist that some other pkg(s) were updated to match :
> it's that simple & Portage shouldn't behave like that.

Portage would not behave like that, if you used it the way it was intended to 
be used;  'emerge -uaDv world' or 'emerge -uaDv clementine' would update 
clementine because it is in your @world set.  The -D option will update any 
dependencies of clementine, ensuring your system has all packages required to 
build clementine and be able to run it thereafter.  If you add '-N' it will 
take account of any changes in USE flags too.  In case you are emerging a 
binary package from binhost, you can use '--with-bdeps n' to stop emerge 
installing build time dependencies not needed for binary packages.


> >> I was able to solve the problem with the help of 'pkg.ref',
> >> my own invention long ago (I've been using Gentoo since 2003).
> >> 
> >> Here is an extract, listing all 'media-libs' pkgs which are installed :
> >>     230717 media-libs/a52dec-0.7.4-r8 [for vlc]
> >>     250427 media-libs/alsa-lib-1.2.13-r3 [for FF]
> >>     230717 media-libs/alsa-topology-conf-1.2.5.1 [for alsa-lib]
> > 
> > Is this manually maintained ?
> 
> Yes : I carefully update it whenever I emerge anything.
> Pkgs in 'world' are marked 'W' & in 'system' 'S' ;
> also, pkgs with special USE needs are marked 'USE'
> & there is a list of such pkgs + flags towards the end of 'pkg.ref'.

This approach may be a niche hobby and a time sink, but it is not necessary 
for installing or maintaining a settled Gentoo system, assuming you use an 
appropriate make.profile and install any individual packages you want to 
remain on your system.


> > What happens when a package is installed due to multiple other packages ?
> 
> The '[for ...]' note lists them all.
> 
> > For top level packages I like to use /etc/portage/sets/* ,
> > which supports comments describing why each package should be in @world.
> 
> I have several such files in the 'sets' dir, eg 'dev-qt',
> which allows me to remove & re-install multiple pkgs easily.

Why would you need to remove, or re-install 'dev-qt', when it is being managed 
as a dependency of packages you will have installed on your system - e.g. 
Plasma/KDE?  Portage will see to it being kept up to date without your manual 
intervention and --depclean will remove any older versions of dev-qt/* 
packages no longer needed.  There is a good use case for your own set files, 
e.g. you are setting up a LAMP server, or a different DE, etc., but usually 
the default sets are adequate for most everyday use cases.


> I don't know how anyone can manage a Gentoo system without such a file.

Believe it or not I rarely create my own set files and only do so when I want 
to test something.  :-)

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to