Discussion:
[gentoo-user] bad $PATH
(too old to reply)
Jorge Almeida
2024-05-02 13:00:01 UTC
Permalink
I have
/var/lib/bin
in my $PATH (both as root and as normal user)

That directory does not exist. Should it exist!?
What could be setting this?
(grep /var/lib/bin /etc/conf.d/* returns nothing)

Anyone with the same problem/weirdness?

Thanks

Jorge Almeida
Peter Humphrey
2024-05-02 13:10:01 UTC
Permalink
Post by Jorge Almeida
I have
/var/lib/bin
in my $PATH (both as root and as normal user)
That directory does not exist. Should it exist!?
What could be setting this?
(grep /var/lib/bin /etc/conf.d/* returns nothing)
Anyone with the same problem/weirdness?
Nope. Have you tried 'grep -r var/lib/bin /etc' ?
--
Regards,
Peter.
Jorge Almeida
2024-05-02 15:40:01 UTC
Permalink
Post by Peter Humphrey
Post by Jorge Almeida
I have
/var/lib/bin
in my $PATH (both as root and as normal user)
Anyone with the same problem/weirdness?
Nope. Have you tried 'grep -r var/lib/bin /etc' ?
/etc/profile.env:export
PATH='/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/17/bin:/var/lib/bin'
/etc/environment.d/10-gentoo-env.conf:PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/17/bin:/var/lib/bin
/etc/env.d/99xstow:PATH=/var/lib/bin
/etc/csh.env:setenv PATH
'/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/17/bin:/var/lib/bin'

So, it seems I have at least one package which I wouldn't expect to
have: app-admin/xstow

I seem to remember I installed a long time ago. It is in the world file,
hence emerge -c wouldn't clean it. I don't have csh but think I had it once
upon a time. Removing...

Ok, done, and the PATH is fine now.

Thanks,

Jorge
Neil Bothwick
2024-05-07 09:40:01 UTC
Permalink
Post by Jorge Almeida
So, it seems I have at least one package which I wouldn't expect to
have: app-admin/xstow
I seem to remember I installed a long time ago. It is in the world file,
hence emerge -c wouldn't clean it. I don't have csh but think I had it
once upon a time. Removing...
emerge -c will remove packages that are in @world. It was probably also a
dependency of something else when you tried before.
--
Neil Bothwick

"Mmmm, trouble with grammer have I, yes?" - Yoda
Jorge Almeida
2024-05-07 10:40:02 UTC
Permalink
Post by Neil Bothwick
Post by Jorge Almeida
I seem to remember I installed a long time ago. It is in the world file,
hence emerge -c wouldn't clean it. I don't have csh but think I had it
dependency of something else when you tried before.
Hmmm... This would seem to contradict the man page. How would emerge -c
decide which packages in the world file were unwanted? Maybe you're
thinking of slotted packages?

Jorge
Neil Bothwick
2024-05-07 12:20:01 UTC
Permalink
Post by Neil Bothwick
Post by Jorge Almeida
I seem to remember I installed a long time ago. It is in the world
file, hence emerge -c wouldn't clean it. I don't have csh but think
I had it
also a dependency of something else when you tried before.
Hmmm... This would seem to contradict the man page.
From man emerge

--depclean, -c
Cleans the system by removing packages that are not
associated with explicitly merged packages. Depclean works by
creating the full dependency tree from the @world set, then
comparing it to installed packages. Packages installed, but not
part of the dependency tree, will be uninstalled by depclean.

It is a little ambiguous in that does the dependency tree from the world
set include the world set itself?
Post by Neil Bothwick
How would emerge -c
decide which packages in the world file were unwanted? Maybe you're
thinking of slotted packages?
No, just tried it. Pick a file from @world and emerge -cpv it.

[***@phoucgh ~ 0]% grep x11vnc /var/lib/portage/world
x11-misc/x11vnc
[***@phoucgh ~ 0]% emerge -cpv x11vnc

Calculating dependencies... done!
Post by Neil Bothwick
Post by Jorge Almeida
Calculating removal order...
x11-misc/x11vnc
selected: 0.9.16-r8
protected: none
omitted: none

All selected packages: =x11-misc/x11vnc-0.9.16-r8
Post by Neil Bothwick
Post by Jorge Almeida
'Selected' packages are slated for removal.
'Protected' and 'omitted' packages will not be removed.
Packages installed: 2083
Packages in world: 350
Packages in system: 49
Required packages: 2082
Number to remove: 1

Files in @world should only be wanted because you put them in there, so
you should be able to remove them.
--
Neil Bothwick

"What I need is a list of specific unknown problems we will encounter."
Jorge Almeida
2024-05-07 12:30:01 UTC
Permalink
Post by Neil Bothwick
you should be able to remove them.
Yes, of course. When I said "emerge -c doesn't clean it" I meant "emerge
-c" (without arguments). I know how to unmerge a package, which in this
particular case I should have done years ago, but didn't, and forgot about
it.

Jorge
Neil Bothwick
2024-05-07 14:40:02 UTC
Permalink
Post by Jorge Almeida
Post by Neil Bothwick
Yes, of course. When I said "emerge -c doesn't clean it" I meant "emerge
-c" (without arguments). I know how to unmerge a package, which in this
particular case I should have done years ago, but didn't, and forgot
about it.
Right, so we were talking at cross purposes. Apologies for the line noise.
--
Neil Bothwick

without C people would code in Basi, Pasal and Obol
Jorge Almeida
2024-05-07 14:50:01 UTC
Permalink
Post by Neil Bothwick
Post by Jorge Almeida
Post by Neil Bothwick
Yes, of course. When I said "emerge -c doesn't clean it" I meant "emerge
-c" (without arguments). I know how to unmerge a package, which in this
particular case I should have done years ago, but didn't, and forgot
about it.
Right, so we were talking at cross purposes. Apologies for the line noise.
No problem. Cheers
Petr Vaněk
2024-05-02 14:10:02 UTC
Permalink
I have /var/lib/bin in my $PATH (both as root and as normal user)
[snip] What could be setting this? (grep /var/lib/bin /etc/conf.d/*
returns nothing)
Do you have app-admin/xstow installed? This seems to be the (only)
package which adds /var/lib/bin to the PATH, see [1]. At least, I was
able to grep -F var/lib/bin pattern only in this package in ::gentoo
overlay.

[1] https://github.com/gentoo/gentoo/blob/c2fb597e863fb296b5cdaf36e8b258b20c47d4a1/app-admin/xstow/xstow-1.1.0.ebuild#L51-L52

Petr
Jorge Almeida
2024-05-02 15:40:01 UTC
Permalink
Post by Petr Vaněk
I have /var/lib/bin in my $PATH (both as root and as normal user)
Do you have app-admin/xstow installed? This seems to be the (only)
Indeed, I had it in the world file, currently unused and long forgotten.
Solved..

Thanks,
Jorge
Loading...