summaryrefslogtreecommitdiff
path: root/build.c
diff options
context:
space:
mode:
authorJindrich Novy <jnovy@redhat.com>2009-01-11 15:23:59 +0100
committerJindrich Novy <jnovy@redhat.com>2009-01-11 15:23:59 +0100
commit1909784075c064ec8102b785415e6e7b832df3c3 (patch)
treeed33e55cd80688eb3d27be90e241b1357b9d6786 /build.c
parent83e5726aadf1ca9111f3cf61130b2be9e3ea4c29 (diff)
downloadlibrpm-tizen-1909784075c064ec8102b785415e6e7b832df3c3.tar.gz
librpm-tizen-1909784075c064ec8102b785415e6e7b832df3c3.tar.bz2
librpm-tizen-1909784075c064ec8102b785415e6e7b832df3c3.zip
Don't fail because of missing sources when only spec
removal is requested (rhbz #472427)
Diffstat (limited to 'build.c')
-rw-r--r--build.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/build.c b/build.c
index e026b139c..3891b2a8d 100644
--- a/build.c
+++ b/build.c
@@ -240,6 +240,12 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba)
goto exit;
}
+ /* Don't parse spec if only its removal is requested */
+ if (ba->buildAmount == RPMBUILD_RMSPEC) {
+ rc = unlink(specFile);
+ goto exit;
+ }
+
/* Parse the spec file */
#define _anyarch(_f) \
(((_f)&(RPMBUILD_PREP|RPMBUILD_BUILD|RPMBUILD_INSTALL|RPMBUILD_PACKAGEBINARY)) == 0)