summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-10-31 14:43:48 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-18 16:42:03 +0000
commita0d1ac7999cc914e170f067428925e1056f5deb7 (patch)
tree1ccaf9bff407193d1eea7aae3926c21426dc4f4c /meta/recipes-devtools
parent11af6b042cee91c52e13df6f76628fdacc5c692a (diff)
downloadast2050-yocto-poky-a0d1ac7999cc914e170f067428925e1056f5deb7.zip
ast2050-yocto-poky-a0d1ac7999cc914e170f067428925e1056f5deb7.tar.gz
python-smartpm: Add basic knowledge of RPMSENSE_MISSINGOK
Currently smart does not support recommend dependencies. Add the first set of 'support' for RPMSENSE_MISSINGOK (the flag that makes something a recommend). This initial support ends up ignoring the recommendation, but is written in a way that it will be the basis of eventual support. (From OE-Core rev: 4f1f6d39803c94cf9ff55f0a4616e7a1703bcef6) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-missingok.patch43
-rw-r--r--meta/recipes-devtools/python/python-smartpm_1.4.1.bb3
2 files changed, 45 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-missingok.patch b/meta/recipes-devtools/python/python-smartpm/smart-missingok.patch
new file mode 100644
index 0000000..7e13869
--- /dev/null
+++ b/meta/recipes-devtools/python/python-smartpm/smart-missingok.patch
@@ -0,0 +1,43 @@
+backends/rpm: Identify recommended packages
+
+We identify and store recommended packages (and later throw that data away.)
+
+This is indended to be the starting work to add support for recommended
+packages to smart.
+
+Upstream-status: Inappropriate [ Code isn't finished! ]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: smart-1.4.1/smart/backends/rpm/header.py
+===================================================================
+--- smart-1.4.1.orig/smart/backends/rpm/header.py
++++ smart-1.4.1/smart/backends/rpm/header.py
+@@ -292,6 +292,7 @@ class RPMHeaderLoader(Loader):
+ f = [0]
+ elif type(f) != list:
+ f = [f]
++ recdict = {}
+ reqdict = {}
+ for i in range(len(n)):
+ ni = n[i]
+@@ -308,10 +309,17 @@ class RPMHeaderLoader(Loader):
+ # RPMSENSE_SCRIPT_PREUN |
+ # RPMSENSE_SCRIPT_POST |
+ # RPMSENSE_SCRIPT_POSTUN == 7744
+- reqdict[(f[i]&7744 and PreReq or Req,
+- intern(ni), r, vi)] = True
++ if (f[i]&rpm.RPMSENSE_MISSINGOK):
++ print "Ignoring Recommend Dependency: %s" % (ni)
++ recdict[(f[i]&7744 and PreReq or Req,
++ intern(ni), r, vi)] = True
++ else:
++ reqdict[(f[i]&7744 and PreReq or Req,
++ intern(ni), r, vi)] = True
++ recargs = collapse_libc_requires(recdict.keys())
+ reqargs = collapse_libc_requires(reqdict.keys())
+ else:
++ recargs = None
+ reqargs = None
+
+ n = h[1054] # RPMTAG_CONFLICTNAME
diff --git a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
index bc0c1f9..4314564 100644
--- a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
+++ b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
@@ -11,13 +11,14 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833"
DEPENDS = "python rpm"
-PR = "r0"
+PR = "r1"
SRCNAME = "smart"
SRC_URI = "\
http://launchpad.net/smart/trunk/${PV}/+download/${SRCNAME}-${PV}.tar.bz2 \
file://smartpm-rpm5-nodig.patch \
file://smart-rpm-root.patch \
+ file://smart-missingok.patch \
"
SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6"
OpenPOWER on IntegriCloud