# 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)"
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.
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.
(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.