summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
diff options
context:
space:
mode:
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 3f27262156..531ea51cad 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
7 7
8Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> 8Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
9 9
10diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py 10[sgw - Added try/catch for rpm4 since it does not have setDFlags() API]
11index 707a146..aec82e7 100644 11
12--- a/smart/backends/rpm/pm.py 12Signed-off-by: Saul Wold <sgw@linux.intel.com>
13+++ b/smart/backends/rpm/pm.py 13
14@@ -106,6 +106,23 @@ class RPMPackageManager(PackageManager): 14
15Index: smart-1.4.1/smart/backends/rpm/pm.py
16===================================================================
17--- smart-1.4.1.orig/smart/backends/rpm/pm.py
18+++ smart-1.4.1/smart/backends/rpm/pm.py
19@@ -106,6 +106,26 @@ class RPMPackageManager(PackageManager):
15 flags |= rpm.RPMTRANS_FLAG_TEST 20 flags |= rpm.RPMTRANS_FLAG_TEST
16 ts.setFlags(flags) 21 ts.setFlags(flags)
17 22
18+ dflags = ts.setDFlags(0) 23+ try:
19+ if sysconf.get("rpm-noupgrade", False): 24+ dflags = ts.setDFlags(0)
20+ dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE 25+ if sysconf.get("rpm-noupgrade", False):
21+ if sysconf.get("rpm-norequires", False): 26+ dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE
22+ dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES 27+ if sysconf.get("rpm-norequires", False):
23+ if sysconf.get("rpm-noconflicts", False): 28+ dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES
24+ dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS 29+ if sysconf.get("rpm-noconflicts", False):
25+ if sysconf.get("rpm-noobsoletes", False): 30+ dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS
26+ dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES 31+ if sysconf.get("rpm-noobsoletes", False):
27+ if sysconf.get("rpm-noparentdirs", False): 32+ dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES
28+ dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS 33+ if sysconf.get("rpm-noparentdirs", False):
29+ if sysconf.get("rpm-nolinktos", False): 34+ dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS
30+ dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS 35+ if sysconf.get("rpm-nolinktos", False):
31+ if sysconf.get("rpm-nosuggest", False): 36+ dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS
32+ dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST 37+ if sysconf.get("rpm-nosuggest", False):
33+ ts.setDFlags(dflags) 38+ dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST
39+ ts.setDFlags(dflags)
40+ except AttributeError, ae:
41+ pass
34+ 42+
35 # Set rpm verbosity level. 43 # Set rpm verbosity level.
36 levelname = sysconf.get('rpm-log-level') 44 levelname = sysconf.get('rpm-log-level')
37 level = { 45 level = {
38--
391.7.9.5
40