- update to rpm-4.10.0
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=213
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
Add support for supplements to the internal dependency
|
||||
generator.
|
||||
Add support for supplements to the internal dependency generator.
|
||||
|
||||
Index: build/rpmfc.c
|
||||
===================================================================
|
||||
--- build/rpmfc.c.orig 2011-12-09 14:46:56.296892644 +0100
|
||||
+++ build/rpmfc.c 2011-12-09 14:47:08.510313829 +0100
|
||||
--- ./build/rpmfc.c.orig 2012-06-01 13:44:21.000000000 +0000
|
||||
+++ ./build/rpmfc.c 2012-06-01 14:00:45.000000000 +0000
|
||||
@@ -57,6 +57,7 @@ struct rpmfc_s {
|
||||
|
||||
rpmds provides; /*!< (no. provides) package provides */
|
||||
@@ -13,40 +10,60 @@ Index: build/rpmfc.c
|
||||
};
|
||||
|
||||
struct rpmfcTokens_s {
|
||||
@@ -504,6 +505,14 @@ static int rpmfcHelper(rpmfc fc, unsigne
|
||||
dsContext = RPMSENSE_FIND_REQUIRES;
|
||||
tagN = RPMTAG_REQUIRENAME;
|
||||
break;
|
||||
+ case 'S':
|
||||
+ if (fc->skipProv)
|
||||
+ return 0;
|
||||
+ depname = "supplements";
|
||||
+ depsp = &fc->supplements;
|
||||
+ dsContext = RPMSENSE_FIND_REQUIRES|RPMSENSE_STRONG|RPMSENSE_MISSINGOK;
|
||||
+ tagN = RPMTAG_ENHANCESNAME;
|
||||
+ break;
|
||||
}
|
||||
@@ -545,6 +546,22 @@ static int rpmfcHelperRequires(rpmfc fc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* If the entire path is filtered out, there's nothing more to do */
|
||||
@@ -779,6 +788,7 @@ rpmfc rpmfcFree(rpmfc fc)
|
||||
+/**
|
||||
+ * Run per-interpreter Supplements: dependency helper.
|
||||
+ * @param fc file classifier
|
||||
+ * @param nsdep class name for interpreter (e.g. "perl")
|
||||
+ * @return 0
|
||||
+ */
|
||||
+static int rpmfcHelperSupplements(rpmfc fc, const char * nsdep)
|
||||
+{
|
||||
+ if (fc->skipReq)
|
||||
+ return 0;
|
||||
+
|
||||
+ rpmfcHelper(fc, nsdep, "supplements", &fc->supplements, RPMSENSE_FIND_REQUIRES|RPMSENSE_STRONG|RPMSENSE_MISSINGOK, RPMTAG_ENHANCESNAME);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/* Only used for elf coloring and controlling RPMTAG_FILECLASS inclusion now */
|
||||
static const struct rpmfcTokens_s rpmfcTokens[] = {
|
||||
{ "directory", RPMFC_INCLUDE },
|
||||
@@ -762,6 +779,7 @@ rpmfc rpmfcFree(rpmfc fc)
|
||||
|
||||
fc->provides = rpmdsFree(fc->provides);
|
||||
fc->requires = rpmdsFree(fc->requires);
|
||||
+ fc->supplements = rpmdsFree(fc->supplements);
|
||||
rpmdsFree(fc->provides);
|
||||
rpmdsFree(fc->requires);
|
||||
+ rpmdsFree(fc->supplements);
|
||||
memset(fc, 0, sizeof(*fc)); /* trash and burn */
|
||||
free(fc);
|
||||
}
|
||||
fc = _free(fc);
|
||||
return NULL;
|
||||
@@ -831,6 +841,7 @@ rpmRC rpmfcApply(rpmfc fc)
|
||||
@@ -793,6 +811,11 @@ rpmds rpmfcRequires(rpmfc fc)
|
||||
return (fc != NULL ? fc->requires : NULL);
|
||||
}
|
||||
|
||||
+rpmds rpmfcSupplements(rpmfc fc)
|
||||
+{
|
||||
+ return (fc != NULL ? fc->supplements : NULL);
|
||||
+}
|
||||
+
|
||||
rpmRC rpmfcApply(rpmfc fc)
|
||||
{
|
||||
const char * s;
|
||||
@@ -814,6 +837,7 @@ rpmRC rpmfcApply(rpmfc fc)
|
||||
for (ARGV_t fattr = fc->fattrs[fc->ix]; fattr && *fattr; fattr++) {
|
||||
xx += rpmfcHelper(fc, 'P', *fattr);
|
||||
xx += rpmfcHelper(fc, 'R', *fattr);
|
||||
+ xx += rpmfcHelper(fc, 'S', *fattr);
|
||||
rpmfcHelperProvides(fc, *fattr);
|
||||
rpmfcHelperRequires(fc, *fattr);
|
||||
+ rpmfcHelperSupplements(fc, *fattr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -873,6 +884,11 @@ rpmRC rpmfcApply(rpmfc fc)
|
||||
@@ -856,6 +880,11 @@ rpmRC rpmfcApply(rpmfc fc)
|
||||
dix = rpmdsFind(fc->requires, ds);
|
||||
ds = rpmdsFree(ds);
|
||||
rpmdsFree(ds);
|
||||
break;
|
||||
+ case 'S':
|
||||
+ ds = rpmdsSingle(RPMTAG_ENHANCESNAME, N, EVR, Flags);
|
||||
@@ -55,13 +72,13 @@ Index: build/rpmfc.c
|
||||
+ break;
|
||||
}
|
||||
|
||||
/* XXX assertion incorrect while generating -debuginfo deps. */
|
||||
@@ -1384,6 +1400,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec
|
||||
if (dix < 0)
|
||||
@@ -1347,6 +1376,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec
|
||||
}
|
||||
}
|
||||
|
||||
+ /* Add Supplements: */
|
||||
+ if (fc->supplements != NULL && rpmdsCount(fc->supplements) > 0 && !fc->skipReq) {
|
||||
+ if (!fc->skipReq) {
|
||||
+ rpmds pi = rpmdsInit(fc->supplements);
|
||||
+ while (rpmdsNext(pi) >= 0) {
|
||||
+ rpmsenseFlags flags = rpmdsFlags(pi);
|
||||
@@ -74,4 +91,20 @@ Index: build/rpmfc.c
|
||||
+
|
||||
/* Add dependency dictionary(#dependencies) */
|
||||
if (rpmtdFromArgi(&td, RPMTAG_DEPENDSDICT, fc->ddictx)) {
|
||||
assert(rpmtdType(&td) == RPM_INT32_TYPE);
|
||||
headerPut(pkg->header, &td, HEADERPUT_DEFAULT);
|
||||
--- ./build/rpmfc.h.orig 2012-06-01 13:53:12.000000000 +0000
|
||||
+++ ./build/rpmfc.h 2012-06-01 13:53:44.000000000 +0000
|
||||
@@ -106,6 +106,13 @@ rpmds rpmfcProvides(rpmfc fc);
|
||||
*/
|
||||
rpmds rpmfcRequires(rpmfc fc);
|
||||
|
||||
+/** \ingroup rpmfc
|
||||
+ * Retrieve file classification supplements
|
||||
+ * @param fc file classifier
|
||||
+ * @return rpmds dependency set of fc requires
|
||||
+ */
|
||||
+rpmds rpmfcSupplements(rpmfc fc);
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user