build/parseReqs.c: make dependencies on rpmlib(SetVersions) feature

This commit is contained in:
Alexey Tourbin 2010-09-11 01:00:13 +04:00
parent 49066900de
commit e1f0ef1fe5
3 changed files with 11 additions and 5 deletions

View File

@ -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);

View File

@ -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. */

View File

@ -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,