From 1909784075c064ec8102b785415e6e7b832df3c3 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Sun, 11 Jan 2009 15:23:59 +0100 Subject: Don't fail because of missing sources when only spec removal is requested (rhbz #472427) --- build.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'build.c') 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) -- cgit v1.2.3