build/parseReqs.c: make dependencies on rpmlib(SetVersions) feature
This commit is contained in:
parent
49066900de
commit
e1f0ef1fe5
@ -183,7 +183,13 @@ int parseRCPOT(Spec spec, Package pkg, const char *field, int tag,
|
||||
return RPMERR_BADSPEC;
|
||||
}
|
||||
|
||||
(void) addReqProv(spec, h, flags, req, version, index);
|
||||
if (addReqProv(spec, h, flags, req, version, index) == 0) {
|
||||
// Set-versions need their rpmlib feature.
|
||||
if (version && strncmp(version, "set:", 4) == 0)
|
||||
// Except for provides, to facilitate bootstrap.
|
||||
if (tag != RPMTAG_PROVIDEFLAGS)
|
||||
rpmlibNeedsFeature(h, "SetVersions", NULL);
|
||||
}
|
||||
|
||||
req = _free(req);
|
||||
version = _free(version);
|
||||
|
@ -379,7 +379,7 @@ int addReqProv(/*@unused@*/ Spec spec, Header h,
|
||||
versions = hfd(versions, dvt);
|
||||
names = hfd(names, dnt);
|
||||
if (duplicate)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Do not add NEW provided requires. */
|
||||
@ -427,7 +427,7 @@ int addReqProv(/*@unused@*/ Spec spec, Header h,
|
||||
versions = hfd (versions, dvt);
|
||||
names = hfd (names, dnt);
|
||||
if (skip)
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
if (*depName == '/' && !(depFlags & RPMSENSE_SENSEMASK))
|
||||
{
|
||||
@ -481,7 +481,7 @@ int addReqProv(/*@unused@*/ Spec spec, Header h,
|
||||
}
|
||||
|
||||
if (skip)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Remove OLD provided requires. */
|
||||
|
@ -401,7 +401,7 @@ int lookupPackage(Spec spec, /*@null@*/ const char * name, int flag,
|
||||
* @param depName (e.g. Requires: foo < 0:1.2-3, "foo")
|
||||
* @param depEVR (e.g. Requires: foo < 0:1.2-3, "0:1.2-3")
|
||||
* @param index (0 always)
|
||||
* @return 0 always
|
||||
* @return 0 if added, 1 if skipped (optimized out)
|
||||
*/
|
||||
int addReqProv(/*@unused@*/Spec spec, Header h,
|
||||
rpmsenseFlags depFlags, const char * depName,
|
||||
|
Loading…
Reference in New Issue
Block a user