On 2/9/26 12:04 PM, Alan Mackenzie wrote:

> It took me some while to work out what you meant by "installed",
> especially given that the ebuild for php-8.2.28-r1 has been deleted
> (from /usr/portage/dev-lang/php/...).  I think you mean that there is a
> directory /var/db/pkg/dev-lang/php-8.2.28-r1, which is indeed the case.
> 
> [ Yes, I know /usr/portage is no longer the canonical place for ebuilds
> to live, but this is a system from 2017, originally. ]
> 
> So emerge @preserved-rebuild is getting its information from
> /var/db/pkg, it seems.
> 
> It is surely a bug that the ebuild can be removed from /usr/portage/...
> whilst leaving that orphan directory in place under /var/db/....  It is
> true that there is a second copy of the ebuild under /var/db/.... but
> emerge doesn't look there for ebuilds.


SIR!!!

The package is installed because there is a file /usr/bin/php8.2
installed, and it is *the package* that installed it.

ebuilds are NOT packages. They are bash scripts describing how to build
a package. Removing an ebuild from /usr/portage (2017) or /var/db/repos
(new canonical place) removes the bash script describing how to build
it. It does NOT remove /usr/bin/php8.2, that would be insane...

... hence the package is installed, still.

/var/db/pkg is not "orphaned" nor is it a bug, it is the database of
installed files etc.


>> If you don't need this package and emerge -pvc shows nothing requiring
>> it, maybe you can just remove it (e.g. with emerge -avc)?
> 
> I can't use emerge, because there's no ebuild for php-8.2.28-r1.  It's
> looking as though I'll have to delete the directory under /var/db/... by
> hand, together with all the associated files throughout the system.
> 
> Or, maybe if I let # USE='...' emerge =dev-lang/php-8.2.30 go ahead, it
> will clear out the old directory in /var/db/...  Maybe.
> 
> Is this worth a bug report, or have I misunderstood something else?


I already told you the same thing, though. My previous email:


>> I've cleaned up my orphan packages (most of them), but don't trust
>> --depclean to do so.  It still wants to remove some packages I need and
>> want to keep.
> 
> It will, by definition, remove packages not in world (emerge foobar
> without --oneshot).
> 
> So, one must conclude you, for whatever reason, wished to oneshot these
> packages and not add them to world.
> 
> This is your choice and your right, but it renders depclean ineffective.
> 
> You may run:
> 
> emerge --depclean php:8.2 --verbose
> 
> and due to verbose, it will tell you what package, if any, prevents
> php:8.2 from being explicitly uninstalled.
> 
> Otherwise, seek out the rest of your orphaned packages.



Please run:

emerge --depclean php:8.2 --verbose

as I asked.


-- 
Eli Schwartz

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to