diff options
author | root <devnull@localhost> | 1996-11-18 23:15:21 +0000 |
---|---|---|
committer | root <devnull@localhost> | 1996-11-18 23:15:21 +0000 |
commit | 21abb0ace5c6eca7b4b80acac1dc3a47ddf591a5 (patch) | |
tree | 0f2b8ce8b12a5782f32af4d2e12dcf0ed0787980 /build | |
parent | 735c84c83a595f7376090a3d9ebd9e31f24e745e (diff) | |
download | rpm-21abb0ace5c6eca7b4b80acac1dc3a47ddf591a5.tar.gz rpm-21abb0ace5c6eca7b4b80acac1dc3a47ddf591a5.tar.bz2 rpm-21abb0ace5c6eca7b4b80acac1dc3a47ddf591a5.zip |
handle new ldd where it returns 1 for non executables
CVS patchset: 1174
CVS date: 1996/11/18 23:15:21
Diffstat (limited to 'build')
-rw-r--r-- | build/reqprov.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/build/reqprov.c b/build/reqprov.c index ff9fc0f80..2a82f32f4 100644 --- a/build/reqprov.c +++ b/build/reqprov.c @@ -18,7 +18,8 @@ #include "misc.h" static StringBuf getOutputFrom(char *dir, char *argv[], - char *writePtr, int writeBytesLeft); + char *writePtr, int writeBytesLeft, + int failNonZero); /*************************************************************/ /* */ @@ -89,7 +90,8 @@ int addReqProv(struct PackageRec *p, int flags, /*************************************************************/ static StringBuf getOutputFrom(char *dir, char *argv[], - char *writePtr, int writeBytesLeft) + char *writePtr, int writeBytesLeft, + int failNonZero) { int progPID; int progDead; @@ -180,7 +182,7 @@ static StringBuf getOutputFrom(char *dir, char *argv[], return NULL; } waitpid(progPID, &status, 0); - if (!WIFEXITED(status) || WEXITSTATUS(status)) { + if (failNonZero && (!WIFEXITED(status) || WEXITSTATUS(status))) { rpmError(RPMERR_EXEC, "%s failed", argv[0]); return NULL; } @@ -241,7 +243,7 @@ int generateAutoReqProv(Header header, struct PackageRec *p) argv[0] = "find-provides"; argv[1] = NULL; - readBuff = getOutputFrom(dir, argv, writePtr, writeBytes); + readBuff = getOutputFrom(dir, argv, writePtr, writeBytes, 1); if (!readBuff) { rpmError(RPMERR_EXEC, "Failed to find provides"); exit(1); @@ -273,7 +275,7 @@ int generateAutoReqProv(Header header, struct PackageRec *p) argv[1] = "-0"; argv[2] = "ldd"; argv[3] = NULL; - readBuff = getOutputFrom(dir, argv, writePtr, writeBytes); + readBuff = getOutputFrom(dir, argv, writePtr, writeBytes, 0); if (!readBuff) { rpmError(RPMERR_EXEC, "Failed to find requires"); exit(1); |