summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2014-09-30 10:16:53 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-30 21:36:13 +0100
commit6be3386e78ec8aac1fd1631047ddf967f4843f3d (patch)
treeb2a1286d6b07865e04caa4f81da0bb90f4a72ded /meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
parent5ad57f4562110ed389c81ce958788014a49f592a (diff)
downloadast2050-yocto-poky-6be3386e78ec8aac1fd1631047ddf967f4843f3d.zip
ast2050-yocto-poky-6be3386e78ec8aac1fd1631047ddf967f4843f3d.tar.gz
python-smartpm: Add patches for rpm4
Add DEPENDS for python-rpm package from either rpm4 or rpm5 Extend the smart-dflags patch to catch an exception if the api does exist (From OE-Core rev: 756e499a95cc928688684cc52bde8e31306e6bbc) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python-smartpm/smart-dflags.patch')
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-dflags.patch53
1 files changed, 29 insertions, 24 deletions
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch b/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
index 3f27262..531ea51 100644
--- a/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
+++ b/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
@@ -7,34 +7,39 @@ Upstream-Status: Pending
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
-index 707a146..aec82e7 100644
---- a/smart/backends/rpm/pm.py
-+++ b/smart/backends/rpm/pm.py
-@@ -106,6 +106,23 @@ class RPMPackageManager(PackageManager):
+[sgw - Added try/catch for rpm4 since it does not have setDFlags() API]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+
+Index: smart-1.4.1/smart/backends/rpm/pm.py
+===================================================================
+--- smart-1.4.1.orig/smart/backends/rpm/pm.py
++++ smart-1.4.1/smart/backends/rpm/pm.py
+@@ -106,6 +106,26 @@ class RPMPackageManager(PackageManager):
flags |= rpm.RPMTRANS_FLAG_TEST
ts.setFlags(flags)
-+ dflags = ts.setDFlags(0)
-+ if sysconf.get("rpm-noupgrade", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE
-+ if sysconf.get("rpm-norequires", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES
-+ if sysconf.get("rpm-noconflicts", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS
-+ if sysconf.get("rpm-noobsoletes", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES
-+ if sysconf.get("rpm-noparentdirs", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS
-+ if sysconf.get("rpm-nolinktos", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS
-+ if sysconf.get("rpm-nosuggest", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST
-+ ts.setDFlags(dflags)
++ try:
++ dflags = ts.setDFlags(0)
++ if sysconf.get("rpm-noupgrade", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE
++ if sysconf.get("rpm-norequires", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES
++ if sysconf.get("rpm-noconflicts", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS
++ if sysconf.get("rpm-noobsoletes", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES
++ if sysconf.get("rpm-noparentdirs", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS
++ if sysconf.get("rpm-nolinktos", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS
++ if sysconf.get("rpm-nosuggest", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST
++ ts.setDFlags(dflags)
++ except AttributeError, ae:
++ pass
+
# Set rpm verbosity level.
levelname = sysconf.get('rpm-log-level')
level = {
---
-1.7.9.5
-
OpenPOWER on IntegriCloud