diff options
| -rw-r--r-- | meta/recipes-devtools/python/python-smartpm/smart-dflags.patch | 40 | ||||
| -rw-r--r-- | meta/recipes-devtools/python/python-smartpm_1.4.1.bb | 1 |
2 files changed, 41 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..3f27262156 --- /dev/null +++ b/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | backends/rpm: add support for setting dependency flags | ||
| 2 | |||
| 3 | This is useful for OpenEmbedded so that we can do the equivalent of | ||
| 4 | the --nolinktos and --noparentdirs rpm command line options. | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 9 | |||
| 10 | diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py | ||
| 11 | index 707a146..aec82e7 100644 | ||
| 12 | --- a/smart/backends/rpm/pm.py | ||
| 13 | +++ b/smart/backends/rpm/pm.py | ||
| 14 | @@ -106,6 +106,23 @@ class RPMPackageManager(PackageManager): | ||
| 15 | flags |= rpm.RPMTRANS_FLAG_TEST | ||
| 16 | ts.setFlags(flags) | ||
| 17 | |||
| 18 | + dflags = ts.setDFlags(0) | ||
| 19 | + if sysconf.get("rpm-noupgrade", False): | ||
| 20 | + dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE | ||
| 21 | + if sysconf.get("rpm-norequires", False): | ||
| 22 | + dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES | ||
| 23 | + if sysconf.get("rpm-noconflicts", False): | ||
| 24 | + dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS | ||
| 25 | + if sysconf.get("rpm-noobsoletes", False): | ||
| 26 | + dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES | ||
| 27 | + if sysconf.get("rpm-noparentdirs", False): | ||
| 28 | + dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS | ||
| 29 | + if sysconf.get("rpm-nolinktos", False): | ||
| 30 | + dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS | ||
| 31 | + if sysconf.get("rpm-nosuggest", False): | ||
| 32 | + dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST | ||
| 33 | + ts.setDFlags(dflags) | ||
| 34 | + | ||
| 35 | # Set rpm verbosity level. | ||
| 36 | levelname = sysconf.get('rpm-log-level') | ||
| 37 | level = { | ||
| 38 | -- | ||
| 39 | 1.7.9.5 | ||
| 40 | |||
diff --git a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb index 9ec7c7a4ec..72a307d2b7 100644 --- a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb +++ b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb | |||
| @@ -19,6 +19,7 @@ SRC_URI = "\ | |||
| 19 | file://smartpm-rpm5-nodig.patch \ | 19 | file://smartpm-rpm5-nodig.patch \ |
| 20 | file://smart-rpm-root.patch \ | 20 | file://smart-rpm-root.patch \ |
| 21 | file://smart-recommends.patch \ | 21 | file://smart-recommends.patch \ |
| 22 | file://smart-dflags.patch \ | ||
| 22 | file://smart-rpm-md-parse.patch \ | 23 | file://smart-rpm-md-parse.patch \ |
| 23 | file://smart-tmpdir.patch \ | 24 | file://smart-tmpdir.patch \ |
| 24 | " | 25 | " |
