Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 317571 - revdep-rebuild fails to assign packages when /var/db/pkg is a symlink. app-portage/gentoolkit-0.2.4.6.1-r1
Summary: revdep-rebuild fails to assign packages when /var/db/pkg is a symlink. app-po...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Portage Tools Team
URL: http://forums.gentoo.org/viewtopic-p-...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 237964
  Show dependency tree
 
Reported: 2010-04-28 03:39 UTC by Giacomo Ferrari
Modified: 2010-11-22 21:44 UTC (History)
1 user (show)

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


Attachments
A simple patch (revdep-rebuild.diff,532 bytes, patch)
2010-05-29 15:46 UTC, david panariti
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Giacomo Ferrari 2010-04-28 03:39:03 UTC
I've got /var/db/pkg as a symlink:
$ file /var/db/pkg
/var/db/pkg: symbolic link to `/mnt/.portage/pkg

Previously, this posed no problem when running revdep-rebuild. Now, however, it fails to assign broken files to packages:
esla ~ # revdep-rebuild -i
 * Configuring search environment for revdep-rebuild

 * Checking reverse dependencies
 * Packages containing binaries and libraries broken by a package update
 * will be emerged.

 * Collecting system binaries and libraries
 * Generated new 1_files.rr
 * Collecting complete LD_LIBRARY_PATH
 * Generated new 2_ldpath.rr
 * Checking dynamic linking consistency
[ 5% ]  *   broken /usr/bin/cinelerra (requires libraw1394.so.8)
<snip>
[ 100% ]                 
 * Generated new 3_broken.rr
 * Assigning files to packages
 *  !!! /usr/bin/cinelerra not owned by any package is broken !!!
 *   /usr/bin/cinelerra -> (none)
<snip>


Reproducible: Always

Steps to Reproduce:
1. Make /var/db/pkg a symlink.
2. Break dynamic linking in your favorite way.
3. run revdep-rebuild.




Thanks to some forum love from FuzzyRay (thread linked in URL field), it was discovered that line 288 in /usr/bin/revdep-rebuild needs to be changed from:
find /var/db/pkg -type f -name CONTENTS -print0 |
to
find /var/db/pkg/ -type f -name CONTENTS -print0 | 

This fixes the problem on my machine.
Comment 1 Paul Varner (RETIRED) gentoo-dev 2010-04-28 15:04:34 UTC
$ svn commit -m "Restore follow symlinks option (-L) to the find /var/db/pkg command so that revdep-rebuild works even when /var/db/pkg is a symlink. (Bug #317571)"
Sending        bin/revdep-rebuild
Transmitting file data .
Committed revision 777.
Comment 2 david panariti 2010-05-29 15:46:32 UTC
Created attachment 233413 [details, diff]
A simple patch

Added a trailing slash to the pkg dir so it will work with symlinks.
Comment 3 david panariti 2010-05-29 15:51:59 UTC
Disregard my patch.
-L is 10^6 better.

I would, however, up the severity of this bug since it prevents revdep-rebuild from working at all for people who use the mentioned symlink.
It's been dogging me for some time but this is the 1st chance I've had to look into it.
Comment 4 Paul Varner (RETIRED) gentoo-dev 2010-11-22 21:44:22 UTC
Released in gentoolkit-0.3.0_rc11