summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/createrepo/createrepo/recommends.patch71
-rw-r--r--meta/recipes-support/createrepo/createrepo_0.4.11.bb3
2 files changed, 73 insertions, 1 deletions
diff --git a/meta/recipes-support/createrepo/createrepo/recommends.patch b/meta/recipes-support/createrepo/createrepo/recommends.patch
new file mode 100644
index 0000000000..dc5de2b5b0
--- /dev/null
+++ b/meta/recipes-support/createrepo/createrepo/recommends.patch
@@ -0,0 +1,71 @@
+createrepo: implement recommends support
+
+Record against the corresponding requires entry in the output metadata
+if a dependency relationship is marked with the RPMSENSE_MISSINGOK flag
+(indicating it is a recommendation, rather than a hard dependency).
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+diff --git a/dumpMetadata.py b/dumpMetadata.py
+index 70bb2d8..e40e8ac 100644
+--- a/dumpMetadata.py
++++ b/dumpMetadata.py
+@@ -319,6 +319,23 @@ class RpmMetaData:
+ reqs.append(0)
+ return reqs
+
++ def _checkMissingOk(self, flags):
++ reqs=[]
++ if flags is None:
++ return reqs
++
++ if type(flags) is not types.ListType:
++ flags = [flags]
++ for flag in flags:
++ newflag = flag
++ if flag is not None:
++ newflag = flag & rpm.RPMSENSE_MISSINGOK
++ if newflag:
++ reqs.append(1)
++ else:
++ reqs.append(0)
++ return reqs
++
+
+ def _correctVersion(self, vers):
+ returnvers = []
+@@ -537,9 +554,10 @@ class RpmMetaData:
+ tmpflags = self.hdr[rpm.RPMTAG_REQUIREFLAGS]
+ flags = self._correctFlags(tmpflags)
+ prereq = self._checkPreReq(tmpflags)
++ missingok = self._checkMissingOk(tmpflags)
+ ver = self._correctVersion(self.hdr[rpm.RPMTAG_REQUIREVERSION])
+ if names is not None:
+- lst = zip(names, flags, ver, prereq)
++ lst = zip(names, flags, ver, prereq, missingok)
+ return self._uniq(lst)
+
+ def obsoletesList(self):
+@@ -692,7 +710,7 @@ def generateXML(doc, node, formatns, rpmObj, sumtype):
+ depsList = rpmObj.depsList()
+ if len(depsList) > 0:
+ rpconode = format.newChild(formatns, 'requires', None)
+- for (name, flags, (e,v,r), prereq) in depsList:
++ for (name, flags, (e,v,r), prereq, missingok) in depsList:
+ entry = rpconode.newChild(formatns, 'entry', None)
+ entry.newProp('name', name)
+ if flags != 0:
+@@ -711,6 +729,8 @@ def generateXML(doc, node, formatns, rpmObj, sumtype):
+ entry.newProp('rel', str(r))
+ if prereq == 1:
+ entry.newProp('pre', str(prereq))
++ if missingok:
++ entry.newProp('missingok', '1')
+
+ for file in rpmObj.usefulFiles():
+ files = format.newChild(None, 'file', None)
+--
+1.7.9.5
+
diff --git a/meta/recipes-support/createrepo/createrepo_0.4.11.bb b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
index 8d2dcdf958..227ebcb491 100644
--- a/meta/recipes-support/createrepo/createrepo_0.4.11.bb
+++ b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
@@ -6,12 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
RDEPENDS_${PN}_class-native += "libxml2-native rpm-native"
-PR = "r7"
+PR = "r8"
SRC_URI= "http://createrepo.baseurl.org/download/${BP}.tar.gz \
file://fix-native-install.patch \
file://python-scripts-should-use-interpreter-from-env.patch \
file://createrepo-rpm549.patch \
+ file://recommends.patch \
file://rpm-createsolvedb.py \
"