diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-08-25 11:03:26 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-08-25 11:03:26 +0300 |
commit | fd893bf69e67719f36195e0b96a8128ed83d3d2c (patch) | |
tree | 46af5c66bd61fdf9d0fa54cf67a6196c7a140784 /rpmbuild.c | |
parent | ddee17551f370ca502cff9ab707fad818beea31b (diff) | |
download | librpm-tizen-fd893bf69e67719f36195e0b96a8128ed83d3d2c.tar.gz librpm-tizen-fd893bf69e67719f36195e0b96a8128ed83d3d2c.tar.bz2 librpm-tizen-fd893bf69e67719f36195e0b96a8128ed83d3d2c.zip |
Fix RhBug:452477 differently to avoid doRmSource()
Diffstat (limited to 'rpmbuild.c')
-rw-r--r-- | rpmbuild.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/rpmbuild.c b/rpmbuild.c index c9eec89df..3afdd30d5 100644 --- a/rpmbuild.c +++ b/rpmbuild.c @@ -201,6 +201,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba) char * specFile = NULL; rpmSpec spec = NULL; int rc = 1; /* assume failure */ + int justRm = ((buildAmount & ~(RPMBUILD_RMSOURCE|RPMBUILD_RMSPEC)) == 0); #ifndef DYING rpmSetTables(RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS); @@ -283,18 +284,11 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba) goto exit; } - if ( ba->buildAmount&RPMBUILD_RMSOURCE && !(ba->buildAmount&~(RPMBUILD_RMSOURCE|RPMBUILD_RMSPEC)) ) { - rc = doRmSource(spec); - if ( rc == RPMRC_OK && ba->buildAmount&RPMBUILD_RMSPEC ) - rc = unlink(specFile); - goto exit; - } - /* Assemble source header from parsed components */ initSourceHeader(spec); - /* Check build prerequisites */ - if (!ba->noDeps && checkSpec(ts, spec->sourceHeader)) { + /* Check build prerequisites if necessary, unless disabled */ + if (!justRm && !ba->noDeps && checkSpec(ts, spec->sourceHeader)) { goto exit; } |