Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 440754 - app-portage/portage-utils-0.20 / qfile doesn't find package for a symlink
Summary: app-portage/portage-utils-0.20 / qfile doesn't find package for a symlink
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-01 15:26 UTC by Helmut Jarausch
Modified: 2012-11-01 21:52 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2012-11-01 15:26:08 UTC

    
Comment 1 Helmut Jarausch 2012-11-01 15:28:58 UTC
It looks as if qfile doesn't find packages containing a given file if this is a symlink, e.g.

ls -l /usr/bin/pg_config
gives  /usr/lib64/postgresql-9.2/bin/pg_config

qfile /usr/bin/pg_config
doesn't show anything, but
equery belongs /usr/bin/pg_config  works

and

qfile /usr/lib64/postgresql-9.2/bin/pg_config 
works, as well.
Comment 2 SpanKY gentoo-dev 2012-11-01 17:23:43 UTC
the package doesn't own that symlink.  it was created outside of the ebuild install (by what mechanism, i don't know exactly ... i'd have to read the code).

equery dereferences the symlink first, but portage-utils does not.  hence technically, the file is orphaned.

you could do the same thing:
$ cd ~/
$ ln -s /usr/bin/pg_config
$ qfile $PWD/pg_config
$ equery belongs $PWD/pg_config

i'd say clearly equery is lying
Comment 3 Helmut Jarausch 2012-11-01 17:45:21 UTC
(In reply to comment #2)
> the package doesn't own that symlink.  it was created outside of the ebuild
> install (by what mechanism, i don't know exactly ... i'd have to read the
> code).
> 
> equery dereferences the symlink first, but portage-utils does not.  hence
> technically, the file is orphaned.
> 
> you could do the same thing:
> $ cd ~/
> $ ln -s /usr/bin/pg_config
> $ qfile $PWD/pg_config
> $ equery belongs $PWD/pg_config
> 
> i'd say clearly equery is lying

Sorry, but I don't understand your arguments:

Here my experience:  (re-)emerging dev-db/glom failed.
It was clear that /usr/bin/pg_config reported an older version of
dev-db/postgresql-base (there 2 different versions installed).
I tried to find out what package had installed /usr/bin/pg_config
and emerge did show the package which installed the file /usr/bin/pg_config is symlinked to. This was very helpful contrary to qfile.
I've found out several times that qfile doesn't know the package of a file.
I definitely didn't create that symlink myself.
And since it points to /usr/lib64/postgresql-9.2/bin/pg_config is very likely that it is installed by dev-db/postgresql-base itself.

In summary: equery depends is helpful, qfile is not (in this case)
Helmut.
Comment 4 Paul Varner (RETIRED) gentoo-dev 2012-11-01 18:56:15 UTC
Technically, qfile is correct.  There is not a package that owns the symlink.  

What equery is doing is noticing that the file is a symlink and also searching for the file that is referenced. The output from equery is reporting that the referenced file belongs to package <blah>. 

This was added to equery due to multiple complaints about files and libraries not being found when they were symlinks.

That being said, Mike is correct in his assessment and it is up to him if he wants qfile to try to dereference a symlink to find a package.