Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 58346 - revdep-rebuild fails to find some broken dependencies
Summary: revdep-rebuild fails to find some broken dependencies
Status: RESOLVED DUPLICATE of bug 80455
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-25 19:16 UTC by Alberto Garcia Hierro (Skyhusker)
Modified: 2005-12-03 07:16 UTC (History)
0 users

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


Attachments
Removed COMPLETE_LD_LIBRARY_PATH - Added DIR_MASK (revdep-rebuild-1.3.patch,2.60 KB, patch)
2005-04-28 01:44 UTC, yuk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Garcia Hierro (Skyhusker) 2004-07-25 19:16:18 UTC
After upgrading to sys-libs/gdbm-1.8.3, I was told to run revdep-rebuild  --soname libgdbm.so.2. It finished without finding any broken binary, but there *are* some broken binaries, for example /usr/bin/svn. Let's see how revdep-rebuild does its job:

------------------------
if ldd "$FILE" 2>/dev/null | grep -v "$LD_MASK" |
                $SONAME_GREP -q "$SONAME_SEARCH" ; then
                if $SEARCH_BROKEN ; then
                if LD_LIBRARY_PATH="$COMPLETE_LD_LIBRARY_PATH" \
                ldd "$FILE" 2>/dev/null | grep -v "$LD_MASK" |
                        $SONAME_GREP -q "$SONAME_SEARCH" ; then
                        echo "$FILE" >>$LLIST.3_rebuild
                        echo_v "  broken $FILE (requires $(ldd "$FILE" | sed -n 's/     \(.*\) => not found$/\1/p' | tr '\n' ' ' | sed 's/ $//' ))"
                fi
                else
                echo "$FILE" >>$LLIST.3_rebuild
                echo_v "  found $FILE"
                fi
        fi
---------------

That isn't right, it doesn't always work. In the case of svn:

fiam@americana 63% fiam $ svn
svn: error while loading shared libraries: /usr/lib/libgdbm.so.2: file too short

fiam@americana 59% fiam $ ldd /usr/bin/svn
/usr/bin/svn: error while loading shared libraries: /usr/lib/libgdbm.so.2: file too short


revdep-rebuild doesn't mark the file as broken, but it clearly is. Even, more files are broken:

fiam@americana 68% fiam $ ./pyrevdep.py libgdbm.so.2 2> /dev/null
        * Searching system binaries and libraries
        * Checking dynamic linking
        * Procesed 6804 of 6805 files (99 %)
        * /usr/lib/perl5/5.8.4/powerpc-linux/auto/GDBM_File/GDBM_File.so is broken
        * /usr/lib/perl5/5.8.4/powerpc-linux/auto/NDBM_File/NDBM_File.so
 is broken
        * /usr/lib/python2.3/lib-dynload/gdbm.so
 is broken
        * /usr/lib/ruby/1.8/powerpc-linux/gdbm.so
 is broken
        * /opt/Ximian-OpenOffice/program/python-core-2.2.2/lib/lib-dynload/gdbm.so
 is broken

(svn files doesn't appear because while filing this bug I reemerged svn)

pyrevdep.py is using objdump to find broken binaries. Please take a look at http://zeus.linuxlover.org/~skyhusker/pyrevdep.py and tell me your opinions. If you are interested, I can implement all the features of revdep-rebuild in it using python and the portage api.
Comment 1 yuk 2005-04-28 01:44:03 UTC
Created attachment 57460 [details, diff]
Removed COMPLETE_LD_LIBRARY_PATH - Added DIR_MASK

revdep-rebuild runs ldd with an LD_LIBRARY_PATH expanded with all dir that
contains at least an executable or a .so (COMPLETE_LD_LIBRARY_PATH). This helps
ldd to find dependencies but it's not real environment when a program run. It's
better using the real LD_LIBRARY_PATH to search dependencies and exclude some
particular packages like OpenOffice, Acrobat 7 and others. I dropped the
expansion of the LD_LIBRARY_PATH and I added a variable for directory
exclusion.
Comment 2 Armin Schreppel 2005-10-06 03:37:44 UTC
same problem with net-mail/courier-imap-3.0.8

revdep-rebuild and patched revdep-rebuild don
Comment 3 Armin Schreppel 2005-10-06 03:37:44 UTC
same problem with net-mail/courier-imap-3.0.8

revdep-rebuild and patched revdep-rebuild don´t find dependency for courier.

skyhuskers pyrevdep.py find´s it. ( thanks skyhusker)
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-12-03 07:16:37 UTC

*** This bug has been marked as a duplicate of 80455 ***