diff options
author | marc <devnull@localhost> | 1997-07-07 21:13:26 +0000 |
---|---|---|
committer | marc <devnull@localhost> | 1997-07-07 21:13:26 +0000 |
commit | 4fc52f759c02ad82d4df94207956fafad46f47d9 (patch) | |
tree | 001be1d8cf4b998dffdd21a068cccb6b463040b8 /build/spec.c | |
parent | 9f56b79acf30747a1102bffcd85b0a9a585ec9a9 (diff) | |
download | librpm-tizen-4fc52f759c02ad82d4df94207956fafad46f47d9.tar.gz librpm-tizen-4fc52f759c02ad82d4df94207956fafad46f47d9.tar.bz2 librpm-tizen-4fc52f759c02ad82d4df94207956fafad46f47d9.zip |
Fix handling of %pre -p <prog> when it has no body
CVS patchset: 1731
CVS date: 1997/07/07 21:13:26
Diffstat (limited to 'build/spec.c')
-rw-r--r-- | build/spec.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/build/spec.c b/build/spec.c index 2379bb790..b45c752a3 100644 --- a/build/spec.c +++ b/build/spec.c @@ -990,9 +990,6 @@ static int finishCurrentPart(Spec spec, StringBuf sb, int t2 = 0; stripTrailingBlanksStringBuf(sb); - if (*(getStringBuf(sb)) == '\0') { - return 0; - } switch (cur_part) { case PREIN_PART: @@ -1038,14 +1035,14 @@ static int finishCurrentPart(Spec spec, StringBuf sb, } break; } - if (t1) { + if (t1 && (*(getStringBuf(sb)) != '\0')) { headerAddEntry(cur_package->header, t1, RPM_STRING_TYPE, getStringBuf(sb), 1); - if (t2) { - addReqProv(cur_package, RPMSENSE_PREREQ, scriptProg, NULL); - headerAddEntry(cur_package->header, t2, - RPM_STRING_TYPE, scriptProg, 1); - } + } + if (t2) { + addReqProv(cur_package, RPMSENSE_PREREQ, scriptProg, NULL); + headerAddEntry(cur_package->header, t2, + RPM_STRING_TYPE, scriptProg, 1); } return 0; } |