Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 160819 - [prelink] make prelink print unresolved dependencies in detail
Summary: [prelink] make prelink print unresolved dependencies in detail
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-08 02:15 UTC by Michael Frank
Modified: 2007-03-25 05:14 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 Michael Frank 2007-01-08 02:15:32 UTC
Prelink produces a cryptic error message "Could not find one of the dependencies"  which the enclosed patch fixes.

The issue popped up because revdep-rebuild is broken - see the next bug

Reproducible: Always

Steps to Reproduce:
Delete a library file and run prelink -n -a
Actual Results:  
/usr/bin/xchat-remote-2: Could not find one of the dependencies

Expected Results:  
/usr/bin/xchat-remote-2: Could not find the dependency libdbus-1.so.2


Patch for sys-devel/prelink-20060712

Patch file: prelink-mhfp42
--- prelink/src/gather.c.orig	2007-01-07 16:22:19.000000000 +0100
+++ prelink/src/gather.c	2007-01-07 23:43:14.000000000 +0100
@@ -56,6 +56,20 @@
 } *blacklist_ext;
 static int blacklist_next;
 
+void depnotfound(const char* lib, const char* dep)
+{
+  char tbuf[64];
+  char *p = tbuf, *d = (char *)dep;
+  int i;
+
+  for (i = 0; *d != ':' && i < 63; i++)
+    *p++ = *d++;
+
+  *p = '\0';
+  
+  error (0, 0, "%s: Could not find the dependency %s",lib,tbuf);
+}
+
 static int
 gather_deps (DSO *dso, struct prelink_entry *ent)
 {
@@ -183,8 +197,7 @@
 	  q = strstr (p, " (");
 	  if (q == NULL && strcmp (p, " => not found") == 0)
 	    {
-	      error (0, 0, "%s: Could not find one of the dependencies",
-		     ent->filename);
+	      depnotfound(ent->filename,p);
 	      goto error_out;
 	    }
 	}
@@ -202,9 +215,7 @@
 				    "No such file or directory");
 		  if (q != NULL)
 		    {
-		      error (0, 0,
-			     "%s: Could not find one of the dependencies",
-			     ent->filename);
+		      depnotfound(ent->filename,p);
 		      goto error_out;
 		    }
 		}
Comment 1 SpanKY gentoo-dev 2007-03-25 05:14:47 UTC
please submit the patch here: http://bugzilla.redhat.com/bugzilla/