Don't fail because of missing sources when only spec
removal is requested (rhbz #472427)
This commit is contained in:
parent
83e5726aad
commit
1909784075
6
build.c
6
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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue