Fix regressions on dynamic buildrequires cli switches (RhBug:2078744)
This effectively reverts commitsb8935fb235
andad8b9bd2ca
and separating -br and -bd from the normal build flow: these are so different from regular builds and in particular, have special semantics wrt --nodeps that trying to cram them into the normal flow only makes it far harder to read and understand.
This commit is contained in:
parent
74c4a31306
commit
a68a2e5057
22
rpmbuild.c
22
rpmbuild.c
|
@ -663,16 +663,12 @@ int main(int argc, char *argv[])
|
|||
/* fallthrough */
|
||||
case 'f':
|
||||
ba->buildAmount |= RPMBUILD_CONF;
|
||||
if ((buildChar == 'f') && shortCircuit)
|
||||
break;
|
||||
/* fallthrough */
|
||||
case 'r':
|
||||
case 'd':
|
||||
ba->buildAmount |= RPMBUILD_BUILDREQUIRES;
|
||||
if (!noDeps) {
|
||||
ba->buildAmount |= RPMBUILD_DUMPBUILDREQUIRES;
|
||||
if (!noDeps)
|
||||
ba->buildAmount |= RPMBUILD_CHECKBUILDREQUIRES;
|
||||
if ((buildChar == 'r' || buildChar == 'd') && shortCircuit)
|
||||
}
|
||||
if ((buildChar == 'f') && shortCircuit)
|
||||
break;
|
||||
/* fallthrough */
|
||||
case 'p':
|
||||
|
@ -681,6 +677,18 @@ int main(int argc, char *argv[])
|
|||
case 'l':
|
||||
ba->buildAmount |= RPMBUILD_FILECHECK;
|
||||
break;
|
||||
case 'r':
|
||||
/* fallthrough */
|
||||
case 'd':
|
||||
if (!shortCircuit)
|
||||
ba->buildAmount |= RPMBUILD_PREP;
|
||||
ba->buildAmount |= RPMBUILD_BUILDREQUIRES;
|
||||
ba->buildAmount |= RPMBUILD_DUMPBUILDREQUIRES;
|
||||
if (!noDeps)
|
||||
ba->buildAmount |= RPMBUILD_CHECKBUILDREQUIRES;
|
||||
if (buildChar == 'd')
|
||||
break;
|
||||
/* fallthrough */
|
||||
case 's':
|
||||
ba->buildAmount |= RPMBUILD_PACKAGESOURCE;
|
||||
break;
|
||||
|
|
|
@ -1707,6 +1707,38 @@ runroot rpmbuild \
|
|||
)
|
||||
AT_CLEANUP
|
||||
|
||||
# Test that -br creates an src.rpm on success
|
||||
AT_SETUP([rpmbuild -br success])
|
||||
AT_KEYWORDS([build])
|
||||
AT_CHECK([
|
||||
RPMDB_INIT
|
||||
|
||||
runroot rpmbuild \
|
||||
-br /data/SPECS/mini.spec
|
||||
],
|
||||
[0],
|
||||
[Wrote: /build/SRPMS/mini-1-1.src.rpm
|
||||
],
|
||||
[],
|
||||
)
|
||||
AT_CLEANUP
|
||||
|
||||
# Test that -br creates an src.rpm on success
|
||||
AT_SETUP([rpmbuild -br success])
|
||||
AT_KEYWORDS([build])
|
||||
AT_CHECK([
|
||||
RPMDB_INIT
|
||||
|
||||
runroot rpmbuild \
|
||||
-br /data/SPECS/mini.spec
|
||||
],
|
||||
[0],
|
||||
[Wrote: /build/SRPMS/mini-1-1.src.rpm
|
||||
],
|
||||
[],
|
||||
)
|
||||
AT_CLEANUP
|
||||
|
||||
# ------------------------------
|
||||
# Check dynamic build requires
|
||||
AT_SETUP([rpmbuild -bd with errors])
|
||||
|
|
Loading…
Reference in New Issue