python-smartpm: rebase patches
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Wed, 8 Oct 2014 07:43:45 +0000 (09:43 +0200)
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Thu, 16 Oct 2014 08:47:45 +0000 (10:47 +0200)
Patches were originally made by Ronan Le Martret <ronan@fridu.net>.

Change-Id: I4e7941c8c96ae143993d7c9e15507c3288504de7
Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
recipes-devtools/python/files/0001-Ignore-arch-for-RPM-4.patch [new file with mode: 0644]
recipes-devtools/python/files/0001-No-getArchScore-for-RPM-4.patch [new file with mode: 0644]
recipes-devtools/python/files/add_archscore.patch [deleted file]
recipes-devtools/python/files/ignorearch_for_ts.patch [deleted file]
recipes-devtools/python/python-smartpm_1.4.1.bbappend

diff --git a/recipes-devtools/python/files/0001-Ignore-arch-for-RPM-4.patch b/recipes-devtools/python/files/0001-Ignore-arch-for-RPM-4.patch
new file mode 100644 (file)
index 0000000..12844a2
--- /dev/null
@@ -0,0 +1,24 @@
+From 67ca8748924daf512888e4738c7e205d24b83b2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?K=C3=A9vin=20THIERRY?= <kevin.thierry@open.eurogiciel.org>
+Date: Mon, 6 Oct 2014 10:24:16 +0200
+Subject: [PATCH] Ignore arch for RPM 4
+
+---
+ smart/backends/rpm/pm.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
+index 1482601..2df05ba 100644
+--- a/smart/backends/rpm/pm.py
++++ b/smart/backends/rpm/pm.py
+@@ -216,6 +216,7 @@ class RPMPackageManager(PackageManager):
+         if sysconf.get("rpm-order"):
+             ts.order()
+         probfilter = rpm.RPMPROB_FILTER_OLDPACKAGE
++      probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH
+         try:
+             # Test for RPM5 function
+             rpm.platformscore("")
+-- 
+1.8.1.4
+
diff --git a/recipes-devtools/python/files/0001-No-getArchScore-for-RPM-4.patch b/recipes-devtools/python/files/0001-No-getArchScore-for-RPM-4.patch
new file mode 100644 (file)
index 0000000..e947ccb
--- /dev/null
@@ -0,0 +1,24 @@
+From 2a0fadb980128da9597553fe965d8842786dc2d6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?K=C3=A9vin=20THIERRY?= <kevin.thierry@open.eurogiciel.org>
+Date: Mon, 6 Oct 2014 10:15:16 +0200
+Subject: [PATCH] No getArchScore() for RPM 4
+
+---
+ smart/backends/rpm/base.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/smart/backends/rpm/base.py b/smart/backends/rpm/base.py
+index d720617..446ce7f 100644
+--- a/smart/backends/rpm/base.py
++++ b/smart/backends/rpm/base.py
+@@ -338,6 +338,7 @@ class RPMObsoletes(Depends):
+ _SCOREMAP = {}
+ def getArchScore(arch, _sm=_SCOREMAP):
++    return 1
+     try:
+         rpm.platformscore(arch)
+         if arch not in _sm:
+-- 
+1.8.1.4
+
diff --git a/recipes-devtools/python/files/add_archscore.patch b/recipes-devtools/python/files/add_archscore.patch
deleted file mode 100644 (file)
index 32ae216..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/smart/backends/rpm/base.py b/smart/backends/rpm/base.py
-index 7140c1b..3ec2e60 100644
---- a/smart/backends/rpm/base.py
-+++ b/smart/backends/rpm/base.py
-@@ -338,6 +338,7 @@ class RPMObsoletes(Depends):
- _SCOREMAP = {}
- def getArchScore(arch, _sm=_SCOREMAP):
-+    return 1
-     if arch not in _sm:
-         score = rpm.archscore(arch)
-         _sm[arch] = score
diff --git a/recipes-devtools/python/files/ignorearch_for_ts.patch b/recipes-devtools/python/files/ignorearch_for_ts.patch
deleted file mode 100644 (file)
index 01238e8..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
-index ecd9f4e..f5c3051 100644
---- a/smart/backends/rpm/pm.py
-+++ b/smart/backends/rpm/pm.py
-@@ -216,6 +216,7 @@ class RPMPackageManager(PackageManager):
-         if sysconf.get("rpm-order"):
-             ts.order()
-         probfilter = rpm.RPMPROB_FILTER_OLDPACKAGE
-+        probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH
-         if force or reinstall:
-             probfilter |= rpm.RPMPROB_FILTER_REPLACEPKG
-             probfilter |= rpm.RPMPROB_FILTER_REPLACEOLDFILES
-@@ -303,7 +304,7 @@ class RPMCallback:
-             self.fd = os.open(path, os.O_RDONLY)
-             setCloseOnExec(self.fd)
-             return self.fd
--        
-+
-         elif what == rpm.RPMCALLBACK_INST_CLOSE_FILE:
-             if self.fd is not None:
-                 os.close(self.fd)
index 27635b4..5546a23 100644 (file)
@@ -5,5 +5,5 @@ SRC_URI_remove = "file://smart-dflags.patch"
 DEPENDS_append = " python-rpm-native "
 
 SRC_URI_append = " file://remove_checkrpm_public_key.patch "
-SRC_URI_append = " file://add_archscore.patch "
-SRC_URI_append = " file://ignorearch_for_ts.patch "
+SRC_URI_append = " file://0001-No-getArchScore-for-RPM-4.patch "
+SRC_URI_append = " file://0001-Ignore-arch-for-RPM-4.patch "