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.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch b/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
new file mode 100644
index 0000000000..531ea51cad
--- /dev/null
+++ b/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
@@ -0,0 +1,45 @@
1backends/rpm: add support for setting dependency flags
2
3This is useful for OpenEmbedded so that we can do the equivalent of
4the --nolinktos and --noparentdirs rpm command line options.
5
6Upstream-Status: Pending
7
8Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
9
10[sgw - Added try/catch for rpm4 since it does not have setDFlags() API]
11
12Signed-off-by: Saul Wold <sgw@linux.intel.com>
13
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):
20 flags |= rpm.RPMTRANS_FLAG_TEST
21 ts.setFlags(flags)
22
23+ try:
24+ dflags = ts.setDFlags(0)
25+ if sysconf.get("rpm-noupgrade", False):
26+ dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE
27+ if sysconf.get("rpm-norequires", False):
28+ dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES
29+ if sysconf.get("rpm-noconflicts", False):
30+ dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS
31+ if sysconf.get("rpm-noobsoletes", False):
32+ dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES
33+ if sysconf.get("rpm-noparentdirs", False):
34+ dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS
35+ if sysconf.get("rpm-nolinktos", False):
36+ dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS
37+ if sysconf.get("rpm-nosuggest", False):
38+ dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST
39+ ts.setDFlags(dflags)
40+ except AttributeError, ae:
41+ pass
42+
43 # Set rpm verbosity level.
44 levelname = sysconf.get('rpm-log-level')
45 level = {