summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/pack.c6
-rw-r--r--build/parsePreamble.c8
-rw-r--r--build/parseReqs.c12
-rw-r--r--build/reqprov.c24
-rw-r--r--build/rpmbuild_internal.h4
-rw-r--r--build/spec.c4
6 files changed, 56 insertions, 2 deletions
diff --git a/build/pack.c b/build/pack.c
index 6480cecaa..e426a75f7 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -232,8 +232,10 @@ static rpmTagVal depevrtags[] = {
RPMTAG_CONFLICTVERSION,
RPMTAG_ORDERVERSION,
RPMTAG_TRIGGERVERSION,
- RPMTAG_SUGGESTSVERSION,
- RPMTAG_ENHANCESVERSION,
+ RPMTAG_SUGGESTVERSION,
+ RPMTAG_ENHANCEVERSION,
+ RPMTAG_RECOMMENDVERSION,
+ RPMTAG_SUPPLEMENTVERSION,
0
};
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index 523e452e3..bf6b26b04 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -785,6 +785,10 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
case RPMTAG_BUILDPREREQ:
case RPMTAG_BUILDREQUIRES:
case RPMTAG_BUILDCONFLICTS:
+ case RPMTAG_RECOMMENDFLAGS:
+ case RPMTAG_SUGGESTFLAGS:
+ case RPMTAG_SUPPLEMENTFLAGS:
+ case RPMTAG_ENHANCEFLAGS:
case RPMTAG_CONFLICTFLAGS:
case RPMTAG_OBSOLETEFLAGS:
case RPMTAG_PROVIDEFLAGS:
@@ -892,6 +896,10 @@ static struct PreambleRec_s const preambleList[] = {
{RPMTAG_ICON, 0, 0, LEN_AND_STR("icon")},
{RPMTAG_PROVIDEFLAGS, 0, 0, LEN_AND_STR("provides")},
{RPMTAG_REQUIREFLAGS, 2, 0, LEN_AND_STR("requires")},
+ {RPMTAG_RECOMMENDFLAGS, 0, 0, LEN_AND_STR("recommends")},
+ {RPMTAG_SUGGESTFLAGS, 0, 0, LEN_AND_STR("suggests")},
+ {RPMTAG_SUPPLEMENTFLAGS, 0, 0, LEN_AND_STR("supplements")},
+ {RPMTAG_ENHANCEFLAGS, 0, 0, LEN_AND_STR("enhances")},
{RPMTAG_PREREQ, 2, 1, LEN_AND_STR("prereq")},
{RPMTAG_CONFLICTFLAGS, 0, 0, LEN_AND_STR("conflicts")},
{RPMTAG_OBSOLETEFLAGS, 0, 0, LEN_AND_STR("obsoletes")},
diff --git a/build/parseReqs.c b/build/parseReqs.c
index 1507090d3..aa1758d9d 100644
--- a/build/parseReqs.c
+++ b/build/parseReqs.c
@@ -52,6 +52,18 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN,
nametag = RPMTAG_REQUIRENAME;
tagflags |= RPMSENSE_ANY;
break;
+ case RPMTAG_RECOMMENDFLAGS:
+ nametag = RPMTAG_RECOMMENDNAME;
+ break;
+ case RPMTAG_SUGGESTFLAGS:
+ nametag = RPMTAG_SUGGESTNAME;
+ break;
+ case RPMTAG_SUPPLEMENTFLAGS:
+ nametag = RPMTAG_SUPPLEMENTNAME;
+ break;
+ case RPMTAG_ENHANCEFLAGS:
+ nametag = RPMTAG_ENHANCENAME;
+ break;
case RPMTAG_PROVIDEFLAGS:
nametag = RPMTAG_PROVIDENAME;
break;
diff --git a/build/reqprov.c b/build/reqprov.c
index bc2f7ea26..cbfbe56b5 100644
--- a/build/reqprov.c
+++ b/build/reqprov.c
@@ -85,6 +85,30 @@ int addReqProv(Header h, rpmTagVal tagN,
flagtag = RPMTAG_ENHANCESFLAGS;
extra = Flags & _ALL_REQUIRES_MASK;
break;
+ case RPMTAG_RECOMMENDNAME:
+ versiontag = RPMTAG_RECOMMENDVERSION;
+ flagtag = RPMTAG_RECOMMENDFLAGS;
+ extra = Flags & _ALL_REQUIRES_MASK;
+ dsp = &pkg->recommends;
+ break;
+ case RPMTAG_SUGGESTNAME:
+ versiontag = RPMTAG_SUGGESTVERSION;
+ flagtag = RPMTAG_SUGGESTFLAGS;
+ extra = Flags & _ALL_REQUIRES_MASK;
+ dsp = &pkg->suggests;
+ break;
+ case RPMTAG_SUPPLEMENTNAME:
+ versiontag = RPMTAG_SUPPLEMENTVERSION;
+ flagtag = RPMTAG_SUPPLEMENTFLAGS;
+ extra = Flags & _ALL_REQUIRES_MASK;
+ dsp = &pkg->supplements;
+ break;
+ case RPMTAG_ENHANCENAME:
+ versiontag = RPMTAG_ENHANCEVERSION;
+ flagtag = RPMTAG_ENHANCEFLAGS;
+ extra = Flags & _ALL_REQUIRES_MASK;
+ dsp = &pkg->enhances;
+ break;
case RPMTAG_REQUIRENAME:
default:
tagN = RPMTAG_REQUIRENAME;
diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
index fb6198d76..b7d8af578 100644
--- a/build/rpmbuild_internal.h
+++ b/build/rpmbuild_internal.h
@@ -88,6 +88,10 @@ struct rpmSpec_s {
struct Package_s {
Header header;
rpmds ds; /*!< Requires: N = EVR */
+ rpmds recommends;
+ rpmds suggests;
+ rpmds supplements;
+ rpmds enhances;
rpmfi cpioList;
struct Source * icon;
diff --git a/build/spec.c b/build/spec.c
index 4b6b6805d..98f7ff77b 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -129,6 +129,10 @@ static Package freePackage(Package pkg)
pkg->header = headerFree(pkg->header);
pkg->ds = rpmdsFree(pkg->ds);
+ pkg->recommends = rpmdsFree(pkg->recommends);
+ pkg->suggests = rpmdsFree(pkg->suggests);
+ pkg->supplements = rpmdsFree(pkg->supplements);
+ pkg->enhances = rpmdsFree(pkg->enhances);
pkg->fileList = argvFree(pkg->fileList);
pkg->fileFile = argvFree(pkg->fileFile);
pkg->policyList = argvFree(pkg->policyList);