Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
equery & sys-apps/sed: no info on hard links
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
dememax
n00b
n00b


Joined: 10 Mar 2019
Posts: 4

PostPosted: Fri May 17, 2024 7:52 pm    Post subject: equery & sys-apps/sed: no info on hard links Reply with quote

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
View user's profile Send private message
freke
l33t
l33t


Joined: 23 Jan 2003
Posts: 998
Location: Somewhere in Denmark

PostPosted: Fri May 17, 2024 9:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
dememax
n00b
n00b


Joined: 10 Mar 2019
Posts: 4

PostPosted: Fri May 17, 2024 9:08 pm    Post subject: Reply with quote

freke wrote:
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)


Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum