diff options
-rw-r--r-- | build.c | 6 | ||||
-rw-r--r-- | build/build.c | 4 |
2 files changed, 6 insertions, 4 deletions
@@ -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) diff --git a/build/build.c b/build/build.c index f78c9fcbb..45e9b1038 100644 --- a/build/build.c +++ b/build/build.c @@ -21,10 +21,6 @@ static void doRmSource(rpmSpec spec) Package pkg; int rc; -#if 0 - rc = unlink(spec->specFile); -#endif - for (p = spec->sources; p != NULL; p = p->next) { if (! (p->flags & RPMBUILD_ISNO)) { char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL); |