Allow '--short-circuit' for '-bb'
This patch allows short-circuiting of building binary packages. To prevent accidental use of short-circuited rpms, they are marked with an unsatisfiable dependency "rpmlib(ShortCircuited)". A developer using this feature for local development and testing will use "--nodeps". Should such a rpm leak into the world, users will quickly notice it does not install by default. (v3: avoids API change, suggested by Panu Matilainen. v2: added poisoning with unsatisfiable dependency.) Michal
This commit is contained in:
parent
b6adef396b
commit
7583fcc341
|
@ -754,6 +754,10 @@ rpmRC packageBinaries(rpmSpec spec)
|
|||
headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
|
||||
}
|
||||
|
||||
if (rpmBTArgs.shortCircuit) {
|
||||
(void) rpmlibNeedsFeature(pkg->header, "ShortCircuited", "4.9.0-1");
|
||||
}
|
||||
|
||||
{ char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
|
||||
char *binRpm, *binDir;
|
||||
binRpm = headerFormat(pkg->header, binFormat, &errorString);
|
||||
|
|
|
@ -170,8 +170,10 @@ used standalone, eg. "\fBrpmbuild\fR \fB--rmspec foo.spec\fR").
|
|||
.TP
|
||||
\fB--short-circuit\fR
|
||||
Skip straight to specified stage (i.e., skip all stages leading
|
||||
up to the specified stage). Only valid with \fB-bc\fR
|
||||
and \fB-bi\fR.
|
||||
up to the specified stage). Only valid with \fB-bc\fR, \fB-bi\fR,
|
||||
and \fB-bb\fR. Useful for local testing only. Packages built this
|
||||
way will be marked with an unsatisfiable dependency to prevent
|
||||
their accidental use.
|
||||
.TP
|
||||
\fB--sign\fR
|
||||
Embed a GPG signature in the package. This signature can be used
|
||||
|
|
Loading…
Reference in New Issue