129 lines
4.3 KiB
Diff
129 lines
4.3 KiB
Diff
|
--- ./build/parsePreamble.c.orig 2014-02-20 15:35:51.192797607 +0000
|
||
|
+++ ./build/parsePreamble.c 2014-02-20 15:36:00.468797591 +0000
|
||
|
@@ -343,6 +343,7 @@ static struct tokenBits_s const installS
|
||
|
{ "verify", RPMSENSE_SCRIPT_VERIFY },
|
||
|
{ "pretrans", RPMSENSE_PRETRANS },
|
||
|
{ "posttrans", RPMSENSE_POSTTRANS },
|
||
|
+ { "hint", RPMSENSE_MISSINGOK },
|
||
|
{ NULL, 0 }
|
||
|
};
|
||
|
|
||
|
--- ./build/rpmfc.c.orig 2014-02-20 15:35:51.204797607 +0000
|
||
|
+++ ./build/rpmfc.c 2014-02-20 15:36:00.468797591 +0000
|
||
|
@@ -1156,6 +1156,12 @@ static struct DepMsg_s depMsgs[] = {
|
||
|
{ "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL },
|
||
|
RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS,
|
||
|
0, -1 },
|
||
|
+ { "Enhances", { "%{?__find_enhances}", NULL, NULL, NULL },
|
||
|
+ RPMTAG_ENHANCENAME, RPMTAG_ENHANCEVERSION, RPMTAG_ENHANCEFLAGS,
|
||
|
+ 0, -1 },
|
||
|
+ { "Supplements", { "%{?__find_supplements}", NULL, NULL, NULL },
|
||
|
+ RPMTAG_SUPPLEMENTNAME, RPMTAG_SUPPLEMENTVERSION, RPMTAG_SUPPLEMENTFLAGS,
|
||
|
+ 0, -1 },
|
||
|
{ NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 }
|
||
|
};
|
||
|
|
||
|
@@ -1231,6 +1237,16 @@ static rpmRC rpmfcGenerateDependsHelper(
|
||
|
if (!pkg->autoReq)
|
||
|
continue;
|
||
|
tagflags = RPMSENSE_FIND_REQUIRES;
|
||
|
+ break;
|
||
|
+ case RPMTAG_ENHANCENAME:
|
||
|
+ if (!pkg->autoReq)
|
||
|
+ continue;
|
||
|
+ tagflags = RPMSENSE_FIND_REQUIRES;
|
||
|
+ break;
|
||
|
+ case RPMTAG_SUPPLEMENTNAME:
|
||
|
+ if (!pkg->autoReq)
|
||
|
+ continue;
|
||
|
+ tagflags = RPMSENSE_FIND_REQUIRES;
|
||
|
break;
|
||
|
default:
|
||
|
continue;
|
||
|
--- ./lib/rpmds.c.orig 2014-02-20 15:35:51.126797608 +0000
|
||
|
+++ ./lib/rpmds.c 2014-02-20 15:35:56.508797598 +0000
|
||
|
@@ -86,6 +86,14 @@ static int dsType(rpmTagVal tag,
|
||
|
t = "Trigger";
|
||
|
evr = RPMTAG_TRIGGERVERSION;
|
||
|
f = RPMTAG_TRIGGERFLAGS;
|
||
|
+ } else if (tag == RPMTAG_OLDSUGGESTSNAME) {
|
||
|
+ t = "Oldsuggests";
|
||
|
+ evr = RPMTAG_OLDSUGGESTSVERSION;
|
||
|
+ f = RPMTAG_OLDSUGGESTSFLAGS;
|
||
|
+ } else if (tag == RPMTAG_OLDSUGGESTSNAME) {
|
||
|
+ t = "Oldenhances";
|
||
|
+ evr = RPMTAG_OLDENHANCESVERSION;
|
||
|
+ f = RPMTAG_OLDENHANCESTSFLAGS;
|
||
|
} else {
|
||
|
rc = 1;
|
||
|
}
|
||
|
--- ./lib/tagexts.c.orig 2014-02-20 15:35:51.131797608 +0000
|
||
|
+++ ./lib/tagexts.c 2014-02-20 15:36:27.137797544 +0000
|
||
|
@@ -906,6 +906,35 @@ static int depnevrsTag(Header h, rpmtd t
|
||
|
return (ndeps > 0);
|
||
|
}
|
||
|
|
||
|
+#define RPMSENSE_STRONG (1 << 27)
|
||
|
+
|
||
|
+static int depnevrsTagFiltered(Header h, rpmtd td, headerGetFlags hgflags,
|
||
|
+ rpmTagVal tag, int strong)
|
||
|
+{
|
||
|
+ rpmds ds = rpmdsNew(h, tag, 0);
|
||
|
+ int ndeps = rpmdsCount(ds);
|
||
|
+
|
||
|
+ if (ndeps > 0) {
|
||
|
+ char **deps = xmalloc(sizeof(*deps) * ndeps);
|
||
|
+ int i;
|
||
|
+ ndeps = 0;
|
||
|
+ while ((i = rpmdsNext(ds)) >= 0) {
|
||
|
+ if ((rpmdsFlags(ds) & RPMSENSE_STRONG) != strong)
|
||
|
+ continue;
|
||
|
+ ndeps = i + 1;
|
||
|
+ deps[i] = rpmdsNewDNEVR(NULL, ds);
|
||
|
+ }
|
||
|
+ if (ndeps) {
|
||
|
+ td->data = deps;
|
||
|
+ td->type = RPM_STRING_ARRAY_TYPE;
|
||
|
+ td->count = ndeps;
|
||
|
+ td->flags |= (RPMTD_ALLOCED | RPMTD_PTR_ALLOCED);
|
||
|
+ }
|
||
|
+ }
|
||
|
+ rpmdsFree(ds);
|
||
|
+ return (ndeps > 0);
|
||
|
+}
|
||
|
+
|
||
|
static int requirenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||
|
{
|
||
|
return depnevrsTag(h, td, hgflags, RPMTAG_REQUIRENAME);
|
||
|
@@ -913,22 +942,26 @@ static int requirenevrsTag(Header h, rpm
|
||
|
|
||
|
static int recommendnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||
|
{
|
||
|
- return depnevrsTag(h, td, hgflags, RPMTAG_RECOMMENDNAME);
|
||
|
+ return depnevrsTag(h, td, hgflags, RPMTAG_RECOMMENDNAME) ||
|
||
|
+ depnevrsTagFiltered(h, td, hgflags, RPMTAG_OLDSUGGESTSNAME, RPMSENSE_STRONG);
|
||
|
}
|
||
|
|
||
|
static int suggestnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||
|
{
|
||
|
- return depnevrsTag(h, td, hgflags, RPMTAG_SUGGESTNAME);
|
||
|
+ return depnevrsTag(h, td, hgflags, RPMTAG_SUGGESTNAME) ||
|
||
|
+ depnevrsTagFiltered(h, td, hgflags, RPMTAG_OLDSUGGESTSNAME, 0);
|
||
|
}
|
||
|
|
||
|
static int supplementnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||
|
{
|
||
|
- return depnevrsTag(h, td, hgflags, RPMTAG_SUPPLEMENTNAME);
|
||
|
+ return depnevrsTag(h, td, hgflags, RPMTAG_SUPPLEMENTNAME) ||
|
||
|
+ depnevrsTagFiltered(h, td, hgflags, RPMTAG_OLDENHANCESSNAME, RPMSENSE_STRONG);
|
||
|
}
|
||
|
|
||
|
static int enhancenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||
|
{
|
||
|
- return depnevrsTag(h, td, hgflags, RPMTAG_ENHANCENAME);
|
||
|
+ return depnevrsTag(h, td, hgflags, RPMTAG_ENHANCENAME) ||
|
||
|
+ depnevrsTagFiltered(h, td, hgflags, RPMTAG_OLDENHANCESSNAME, 0);
|
||
|
}
|
||
|
|
||
|
static int providenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|