if (digestalgo != defaultalgo) {
headerPutUint32(h, RPMTAG_FILEDIGESTALGO, &digestalgo, 1);
- rpmlibNeedsFeature(h, "FileDigests", "4.6.0-1");
+ rpmlibNeedsFeature(pkg, "FileDigests", "4.6.0-1");
}
if (fl->haveCaps) {
- rpmlibNeedsFeature(h, "FileCaps", "4.6.1-1");
+ rpmlibNeedsFeature(pkg, "FileCaps", "4.6.1-1");
}
if (_addDotSlash)
- (void) rpmlibNeedsFeature(h, "PayloadFilesHavePrefix", "4.0-1");
+ (void) rpmlibNeedsFeature(pkg, "PayloadFilesHavePrefix", "4.0-1");
{
struct rpmtd_s filenames;
if (!(fl->pkgFlags & RPMBUILD_PKG_NODIRTOKENS)) {
headerConvert(h, HEADERCONV_COMPRESSFILELIST);
/* Binary packages with dirNames cannot be installed by legacy rpm. */
- (void) rpmlibNeedsFeature(h, "CompressedFileNames", "3.0.4-1");
+ (void) rpmlibNeedsFeature(pkg, "CompressedFileNames", "3.0.4-1");
}
}
/* Verify that file attributes scope over hardlinks correctly. */
if (checkHardLinks(&fl.files))
- (void) rpmlibNeedsFeature(pkg->header,
- "PartialHardlinkSets", "4.0.4-1");
+ (void) rpmlibNeedsFeature(pkg, "PartialHardlinkSets", "4.0.4-1");
genCpioListAndHeader(&fl, pkg, 0);
} else if (rstreq(s+1, "bzdio")) {
compr = "bzip2";
/* Add prereq on rpm version that understands bzip2 payloads */
- (void) rpmlibNeedsFeature(pkg->header, "PayloadIsBzip2", "3.0.5-1");
+ (void) rpmlibNeedsFeature(pkg, "PayloadIsBzip2", "3.0.5-1");
#endif
#if HAVE_LZMA_H
} else if (rstreq(s+1, "xzdio")) {
compr = "xz";
- (void) rpmlibNeedsFeature(pkg->header, "PayloadIsXz", "5.2-1");
+ (void) rpmlibNeedsFeature(pkg, "PayloadIsXz", "5.2-1");
} else if (rstreq(s+1, "lzdio")) {
compr = "lzma";
- (void) rpmlibNeedsFeature(pkg->header, "PayloadIsLzma", "4.4.6-1");
+ (void) rpmlibNeedsFeature(pkg, "PayloadIsLzma", "4.4.6-1");
#endif
} else {
rpmlog(RPMLOG_ERR, _("Unknown payload compression: %s\n"),
/* check if the package has a dependency with a '~' */
if (haveTildeDep(pkg->header))
- (void) rpmlibNeedsFeature(pkg->header, "TildeInVersions", "4.10.0-1");
+ (void) rpmlibNeedsFeature(pkg, "TildeInVersions", "4.10.0-1");
/* Create and add the cookie */
if (cookie) {
}
if (cheating) {
- (void) rpmlibNeedsFeature(pkg->header, "ShortCircuited", "4.9.0-1");
+ (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
}
{ char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
if (rpmluaCheckScript(lua, p, partname) != RPMRC_OK) {
goto exit;
}
- (void) rpmlibNeedsFeature(pkg->header,
- "BuiltinLuaScripts", "4.2.2-1");
+ (void) rpmlibNeedsFeature(pkg, "BuiltinLuaScripts", "4.2.2-1");
} else
#endif
if (progArgv[0][0] == '<') {
}
if (scriptFlags) {
- rpmlibNeedsFeature(pkg->header, "ScriptletExpansion", "4.9.0-1");
+ rpmlibNeedsFeature(pkg, "ScriptletExpansion", "4.9.0-1");
}
/* Trigger script insertion is always delayed in order to */
td.data = (void *) *progArgv;
td.type = RPM_STRING_TYPE;
} else {
- (void) rpmlibNeedsFeature(pkg->header,
+ (void) rpmlibNeedsFeature(pkg,
"ScriptletInterpreterArgs", "4.0.3-1");
td.data = progArgv;
td.type = RPM_STRING_ARRAY_TYPE;
return 0;
}
-int rpmlibNeedsFeature(Header h, const char * feature, const char * featureEVR)
+int rpmlibNeedsFeature(Package pkg, const char * feature, const char * featureEVR)
{
char *reqname = NULL;
int res;
rasprintf(&reqname, "rpmlib(%s)", feature);
- res = addReqProv(h, RPMTAG_REQUIRENAME, reqname, featureEVR,
+ res = addReqProv(pkg->header, RPMTAG_REQUIRENAME, reqname, featureEVR,
RPMSENSE_RPMLIB|(RPMSENSE_LESS|RPMSENSE_EQUAL), 0);
free(reqname);
/** \ingroup rpmbuild
* Add rpmlib feature dependency.
- * @param h header
+ * @param pkg package
* @param feature rpm feature name (i.e. "rpmlib(Foo)" for feature Foo)
* @param featureEVR rpm feature epoch/version/release
* @return 0 always
*/
RPM_GNUC_INTERNAL
-int rpmlibNeedsFeature(Header h, const char * feature, const char * featureEVR);
+int rpmlibNeedsFeature(Package pkg, const char * feature, const char * featureEVR);
#ifdef __cplusplus
}