Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 932275 - games-misc/cowsay cant find cowfiles
Summary: games-misc/cowsay cant find cowfiles
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-20 08:35 UTC by Anard
Modified: 2024-05-21 06:52 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge--infocowsay-7N4A.txt,8.69 KB, text/plain)
2024-05-21 06:01 UTC, Anard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anard 2024-05-20 08:35:22 UTC
cowsay report it can't find cowfiles, even if they exist. Maybe due to merged usr.

https://bpa.st/WRBQ
https://bpa.st/JQ7Q
https://bpa.st/QFLQ
Comment 1 Eli Schwartz gentoo-dev 2024-05-20 21:46:51 UTC
>  Always attach the output of emerge --info to your bug report!

Please provide this. :)

Please also post the value of $PATH.
Comment 2 Anard 2024-05-21 05:34:52 UTC
Sorry.
Here is :
https://bpa.st/7N4A

PATH = /home/anard/Applications/git-subrepo/lib:/home/anard/Applications/git-subrepo/lib:/home/anard/gems/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/11/bin
Comment 3 Greg Kubaryk 2024-05-21 05:45:20 UTC
Links to pastes that expire are useful in support channels but not on bug trackers; please attach files or comment as necessary.
Comment 4 Eli Schwartz gentoo-dev 2024-05-21 05:47:24 UTC
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

This looks weird and duplicative. Have you updated your env and re-sourced /etc/profile? These directories shouldn't exist multiple times -- they are all the same directory on merged-usr.

Looking at the cowsay script, it actually tries to see if the path it is invoked as (in this case, /usr/sbin/cowsay) contains /bin/ and otherwise assumes it is running from a git repo and stops looking for cowfiles in /usr/share.

It's a bad upstream design, although also solvable by setting PATH correctly.
Comment 5 Anard 2024-05-21 06:01:01 UTC
Created attachment 893617 [details]
emerge --info
Comment 6 Anard 2024-05-21 06:12:19 UTC
Thx.

I just checked, it seems that my /usr/local/(s)bin are different :

$ ls -l / | grep bin
lrwxrwxrwx   1 root root     7 25 mars  07:53 bin -> usr/bin
lrwxrwxrwx   1 root root     7 25 mars  07:53 sbin -> usr/bin
$ ls -l /usr/ | grep bin
drwxr-xr-x   3 root root 102400 21 mai   07:52 bin
lrwxrwxrwx   1 root root      3 25 mars  07:53 sbin -> bin
$ ls -l /usr/local/ | grep bin
drwxr-xr-x 2 root root 4096  2 nov.   2023 bin
drwxr-xr-x 2 root root 4096 24 juin   2023 sbin

So I removed /bin, /sbin and /usr/bin from my .bashrc and it works well now.

Thank you