summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
blob: 3f272621560a10ca24f652b7feaf99b917013274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
backends/rpm: add support for setting dependency flags

This is useful for OpenEmbedded so that we can do the equivalent of
the --nolinktos and --noparentdirs rpm command line options.

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):
             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)
+
         # Set rpm verbosity level.
         levelname = sysconf.get('rpm-log-level')
         level = {
-- 
1.7.9.5

'> 2008-03-24Adding functional pointercal file configuration for N800Rodrigo Vivi1 This pointercal configuration has been hardly tested. 2008-03-24Adding pointercal configuration file for Nokia 770Rodrigo Vivi2 This file was generated using ts_calibrate and tested in different devices. 2008-01-08pointercal_0.0.bb : revert changes made to make this package use MACHINE_CLASSGraeme Gregory2 in openmoko. Turns out screens are very different calibration for gta01/02 2007-12-14pointercal 0.0 add file for e680Michael Lauer3 2007-09-24pointercal: remove broken n800 oneKoen Kooi2 2007-09-15pointercal: add file for a780Koen Kooi3 2007-08-02pointercal: add calibration constants for fic-gta0[12]Michael Lauer5 2007-05-26pointercal: remove hh.org kernel ports since they are too unstableKoen Kooi7 2007-05-18pointercal: merge from poky, add some more from ↵Koen Kooi20 http://linuxtogo.org/gowiki/AngstromPointercals