From 03fce7358deed578f4be13f54ddf87eeee35b909 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Fri, 11 Mar 2016 14:07:30 +0000 Subject: smartpm: remove rpm4 patch The RPM4 support we added to SMART doesn't appear to work, remove it as part of the removal of RPM4 from OE-Core. Refresh the smart-add-for-rpm-ignoresize-check.patch which was applied after smart-rpm4-fixes.patch and doesn't apply cleanly once that patch is removed. (From OE-Core rev: e1108fa41742e726aa578d0298fa6397b2663ff3) Signed-off-by: Joshua Lock Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- .../python/python-smartpm/smart-rpm4-fixes.patch | 49 ---------------------- 1 file changed, 49 deletions(-) delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch (limited to 'meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch') diff --git a/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch b/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch deleted file mode 100644 index 708ffe67d3..0000000000 --- a/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch +++ /dev/null @@ -1,49 +0,0 @@ - -This patch checks for rpm5 related functions in order to allow rpm4 -to work correctly. Currently the rpm4 archscore and filter work -differently enough that they need to be changed. - -Upstream-Status: Inappropriate [OE-Core Specific] - -Signed-off-by: Saul Wold - -Index: smart-1.4.1/smart/backends/rpm/base.py -=================================================================== ---- smart-1.4.1.orig/smart/backends/rpm/base.py -+++ smart-1.4.1/smart/backends/rpm/base.py -@@ -338,10 +338,14 @@ class RPMObsoletes(Depends): - - _SCOREMAP = {} - def getArchScore(arch, _sm=_SCOREMAP): -- if arch not in _sm: -- score = rpm.archscore(arch) -- _sm[arch] = score -- return _sm.get(arch, 0) -+ try: -+ rpm.platformscore(arch) -+ if arch not in _sm: -+ score = rpm.archscore(arch) -+ _sm[arch] = score -+ return _sm.get(arch, 0) -+ except AttributeError: -+ return 1 - - # TODO: Embed color into nameprovides and obsoletes relations. - _COLORMAP = {"noarch": 0, "x86_64": 2, "ppc64": 2, "s390x": 2, "sparc64": 2} -Index: smart-1.4.1/smart/backends/rpm/pm.py -=================================================================== ---- smart-1.4.1.orig/smart/backends/rpm/pm.py -+++ smart-1.4.1/smart/backends/rpm/pm.py -@@ -235,6 +235,12 @@ class RPMPackageManager(PackageManager): - if sysconf.get("rpm-order"): - ts.order() - probfilter = rpm.RPMPROB_FILTER_OLDPACKAGE -+ try: -+ # Test for RPM5 function -+ rpm.platformscore("") -+ except AttributeError: -+ probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH -+ - if force or reinstall: - probfilter |= rpm.RPMPROB_FILTER_REPLACEPKG - probfilter |= rpm.RPMPROB_FILTER_REPLACEOLDFILES -- cgit v1.2.3-54-g00ecf