diff options
| author | Saul Wold <sgw@linux.intel.com> | 2014-09-30 10:16:53 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-30 21:36:13 +0100 |
| commit | 6be3386e78ec8aac1fd1631047ddf967f4843f3d (patch) | |
| tree | b2a1286d6b07865e04caa4f81da0bb90f4a72ded /meta/recipes-devtools/python/python-smartpm/smart-dflags.patch | |
| parent | 5ad57f4562110ed389c81ce958788014a49f592a (diff) | |
| download | 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.patch | 53 |
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 | ||
| 8 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | 8 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> |
| 9 | 9 | ||
| 10 | diff --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] |
| 11 | index 707a146..aec82e7 100644 | 11 | |
| 12 | --- a/smart/backends/rpm/pm.py | 12 | Signed-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 | |
| 15 | Index: 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 | -- | ||
| 39 | 1.7.9.5 | ||
| 40 | |||
