summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authormarc <devnull@localhost>1996-07-20 22:19:18 +0000
committermarc <devnull@localhost>1996-07-20 22:19:18 +0000
commit8dadbc32bc4cf2eb8aaf3e2074dd9e02e635ed95 (patch)
tree2d91982508a99f612c4b0e02fcfd733ee4848c9c /build
parent970890e71e77a54f5b143b616cb7423b88fd03e5 (diff)
downloadrpm-8dadbc32bc4cf2eb8aaf3e2074dd9e02e635ed95.tar.gz
rpm-8dadbc32bc4cf2eb8aaf3e2074dd9e02e635ed95.tar.bz2
rpm-8dadbc32bc4cf2eb8aaf3e2074dd9e02e635ed95.zip
skip blank lines and "_end" from objdump
skip lead "/" in filenames passed to ldd CVS patchset: 904 CVS date: 1996/07/20 22:19:18
Diffstat (limited to 'build')
-rw-r--r--build/reqprov.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/build/reqprov.c b/build/reqprov.c
index 78a0170ae..e488fe091 100644
--- a/build/reqprov.c
+++ b/build/reqprov.c
@@ -110,9 +110,12 @@ static void parseFileForProv(char *f, struct PackageRec *p)
soname[0] = '\0';
fgets(soname, sizeof(soname)-1, pipe);
pclose(pipe);
- if ((len = strlen(soname))) {
+ /* length 1 lines are empty */
+ if ((len = strlen(soname)) > 1) {
soname[len-1] = '\0';
- addReqProv(p, REQUIRE_PROVIDES, soname, NULL);
+ /* Skip "_end" results */
+ if (strcmp(soname, "_end"))
+ addReqProv(p, REQUIRE_PROVIDES, soname, NULL);
}
}
}
@@ -191,8 +194,9 @@ int generateAutoReqProv(Header header, struct PackageRec *p)
writeBytesLeft = 0;
while (count--) {
s = *f++;
- writeBytesLeft += strlen(s) + 1;
- appendLineStringBuf(writeBuff, s);
+ /* We skip the leading "/" (already normalized) */
+ writeBytesLeft += strlen(s);
+ appendLineStringBuf(writeBuff, s + 1);
parseFileForProv(s, p);
}
writePtr = getStringBuf(writeBuff);