Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 133224 - equery can not always find packages that created files or symlinks
Summary: equery can not always find packages that created files or symlinks
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-13 11:30 UTC by DEMAINE Benoît-Pierre, aka DoubleHP
Modified: 2010-03-06 15:40 UTC (History)
3 users (show)

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 DEMAINE Benoît-Pierre, aka DoubleHP 2006-05-13 11:30:54 UTC
# equery b /usr/bin/latex
[ Searching for file(s) /usr/bin/latex in *... ]
# file -s /usr/bin/latex
/usr/bin/latex: symbolic link to `pdfetex'
# file -s /usr/bin/pdfetex
/usr/bin/pdfetex: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), for GNU/Linux 2.4.1, stripped
#  equery b /usr/bin/pdfetex
[ Searching for file(s) /usr/bin/pdfetex in *... ]
app-text/tetex-3.0_p1-r2 (/usr/bin/pdfetex)

other people reported:
"I get app-text/tetex-2.0.2-r5 (/usr/bin/latex -> /usr/bin/tex)"
Comment 1 Dan Fego 2008-11-01 08:21:58 UTC
After taking a look at this (without any prior knowledge of the workings of the program, or Python for that matter), it looks like the problem is coming from line 417 of the "equery" file (SVN version of gentoolkit):

cnt = portage.dblink(mysplit[0], mysplit[1], "/", gentoolkit.settings).getcontents()

That's where it makes a call to portage.dblink.  Not sure what that does (yet), but I shoved in a "print file" in the very beginning for loop immediately after that, checked the output, and the file in question isn't there.

Hope this helps, I'll see if I can't figure anything else out in the meantime.
Comment 2 Dan Fego 2008-11-13 07:08:52 UTC
After some further investigation, it seems that the database which contains all the info that equery holds doesn't *have* this particular file in it (/usr/bin/latex).

I took a look in /var/db/pkg, and then app-text/tetex-3.0_p1-r6/CONTENTS, which is where it's drawing its information from.  The filename just isn't there.  I'm not sure how that information is populated, but that's where the problem lies.
Comment 3 Douglas Anderson 2010-03-06 15:40:41 UTC
(In reply to comment #2)
> After some further investigation, it seems that the database which contains all
> the info that equery holds doesn't *have* this particular file in it
> (/usr/bin/latex).
> 
> I took a look in /var/db/pkg, and then app-text/tetex-3.0_p1-r6/CONTENTS, which
> is where it's drawing its information from.  The filename just isn't there. 
> I'm not sure how that information is populated, but that's where the problem
> lies.

It's the ebuild's job to tell Portage what is being installed. Gentoolkit just consumes the Portage API, so if the ebuild installs a symlink without telling Portage, Gentoolkit has no way of knowing about it.

Bug #286508 may be slightly related.