summaryrefslogtreecommitdiff
path: root/build/rpmfc.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2013-04-16 10:05:51 +0300
committerPanu Matilainen <pmatilai@redhat.com>2013-04-16 10:05:51 +0300
commit84fb114457534f4d017981102fe07778f98e3b43 (patch)
tree80c89bef6b11263abefb76117b7c739fd9552141 /build/rpmfc.c
parent66b68d455dd117dbc4d28c45c6a7e427f79e471c (diff)
downloadrpm-84fb114457534f4d017981102fe07778f98e3b43.tar.gz
Utilize the existing rpmds'es from packages when merging generated deps
- We already have the manually added dependencies in the per-package rpmds'es so we can just merge, no need to reconstruct them from the header.
Diffstat (limited to 'build/rpmfc.c')
-rw-r--r--build/rpmfc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 441e89b66..2f0eac400 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -1244,9 +1244,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
/* Copy (and delete) manually generated dependencies to dictionary. */
if (!fc->skipProv) {
- rpmds ds = rpmdsNew(pkg->header, RPMTAG_PROVIDENAME, 0);
- rpmdsMerge(&fc->provides, ds);
- rpmdsFree(ds);
+ rpmdsMerge(&fc->provides, pkg->provides);
headerDel(pkg->header, RPMTAG_PROVIDENAME);
headerDel(pkg->header, RPMTAG_PROVIDEVERSION);
@@ -1254,7 +1252,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
/* Add config dependency, Provides: config(N) = EVR */
if (genConfigDeps) {
- ds = rpmdsSingleNS(RPMTAG_PROVIDENAME, "config",
+ rpmds ds = rpmdsSingleNS(RPMTAG_PROVIDENAME, "config",
rpmdsN(pkg->ds), rpmdsEVR(pkg->ds),
(RPMSENSE_EQUAL|RPMSENSE_CONFIG));
rpmdsMerge(&fc->provides, ds);
@@ -1263,9 +1261,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
}
if (!fc->skipReq) {
- rpmds ds = rpmdsNew(pkg->header, RPMTAG_REQUIRENAME, 0);
- rpmdsMerge(&fc->requires, ds);
- rpmdsFree(ds);
+ rpmdsMerge(&fc->requires, pkg->requires);
headerDel(pkg->header, RPMTAG_REQUIRENAME);
headerDel(pkg->header, RPMTAG_REQUIREVERSION);
@@ -1273,7 +1269,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
/* Add config dependency, Requires: config(N) = EVR */
if (genConfigDeps) {
- ds = rpmdsSingleNS(RPMTAG_REQUIRENAME, "config",
+ rpmds ds = rpmdsSingleNS(RPMTAG_REQUIRENAME, "config",
rpmdsN(pkg->ds), rpmdsEVR(pkg->ds),
(RPMSENSE_EQUAL|RPMSENSE_CONFIG));
rpmdsMerge(&fc->requires, ds);