View previous topic :: View next topic |
Author |
Message |
dememax n00b
Joined: 10 Mar 2019 Posts: 4
|
Posted: Fri May 17, 2024 7:52 pm Post subject: equery & sys-apps/sed: no info on hard links |
|
|
Hi!
I've got sed installed:
Code: | $ emerge -pv sys-apps/sed
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 0.66 s (backtrack: 0/20).
[ebuild R ] sys-apps/sed-4.9::gentoo USE="acl nls verify-sig (-selinux) -static" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB
|
But if I try to resolve the corresponding command, equery fails to find the package:
Code: | $ readlink -e `which sed`
/usr/bin/gsed
$ equery b /usr/bin/gsed
* Searching for /usr/bin/gsed ... |
If I list all files of the package, I don't see that executable:
Code: | $ equery f sys-apps/sed
* Searching for sed in sys-apps ...
* Contents of sys-apps/sed-4.9:
/bin
/bin/gsed
/bin/sed -> gsed
/usr
/usr/lib
/usr/lib/debug
/usr/lib/debug/bin
/usr/lib/debug/bin/gsed.debug
/usr/share
/usr/share/doc
/usr/share/doc/sed-4.9
/usr/share/doc/sed-4.9/AUTHORS.gz
/usr/share/doc/sed-4.9/BUGS.gz
/usr/share/doc/sed-4.9/ChangeLog.gz
/usr/share/doc/sed-4.9/NEWS.gz
/usr/share/doc/sed-4.9/README.gz
/usr/share/doc/sed-4.9/THANKS.gz
/usr/share/info
/usr/share/info/sed.info.gz
/usr/share/locale
/usr/share/locale/es
/usr/share/locale/es/LC_MESSAGES
/usr/share/locale/es/LC_MESSAGES/sed.mo
/usr/share/locale/fr
/usr/share/locale/fr/LC_MESSAGES
/usr/share/locale/fr/LC_MESSAGES/sed.mo
/usr/share/locale/ja
/usr/share/locale/ja/LC_MESSAGES
/usr/share/locale/ja/LC_MESSAGES/sed.mo
/usr/share/locale/ru
/usr/share/locale/ru/LC_MESSAGES
/usr/share/locale/ru/LC_MESSAGES/sed.mo
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/gsed.1.gz
/usr/share/man/man1/sed.1.gz -> gsed.1.gz |
Than I've found that there is dosym in scr_install() at the end of ebuild:
Code: | src_install() {
default
# symlink to the standard name
dosym gsed /bin/sed
dosym gsed.1 /usr/share/man/man1/sed.1
} |
And in fact, /usr/bin/gsed and /bin/gsed are hardlinks:
Code: | $ ls -i /usr/bin/gsed /bin/gsed
8926372 /bin/gsed 8926372 /usr/bin/gsed |
So, how come equery doesn't know about these hardlinks (/usr/bin/gsed)? |
|
Back to top |
|
|
freke l33t
Joined: 23 Jan 2003 Posts: 998 Location: Somewhere in Denmark
|
Posted: Fri May 17, 2024 9:03 pm Post subject: |
|
|
I experienced this after switching from split-usr to merged-usr.
Bug exists : https://bugs.gentoo.org/927640 - and https://bugs.gentoo.org/927640#c12 gives an easy workaround (use filename only for equery - leave out the path)
Can also check app-portage/pfl - it works with an online-db: Code: | ns ~ # e-file /bin/sed
sys-apps/sed
Seen Versions: 4.9
Portage Versions: 4.9
Repository: gentoo
Installed Versions: 4.9(Sun May 12 14:06:37 2024)
Homepage: https://www.gnu.org/software/sed/
Description: Super-useful stream editor
Matched Files: /bin/sed
ns ~ # e-file /usr/bin/sed
sys-apps/sed
Seen Versions: 4.9
Portage Versions: 4.9
Repository: gentoo
Installed Versions: 4.9(Sun May 12 14:06:37 2024)
Homepage: https://www.gnu.org/software/sed/
Description: Super-useful stream editor
Matched Files: /bin/sed |
|
|
Back to top |
|
|
dememax n00b
Joined: 10 Mar 2019 Posts: 4
|
Posted: Fri May 17, 2024 9:08 pm Post subject: |
|
|
Thanks! |
|
Back to top |
|
|
|