summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
diff options
context:
space:
mode:
authorKlauer, Daniel <Daniel.Klauer@gin.de>2016-05-17 12:58:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-19 09:05:18 +0100
commitbe0cabf816a84c59e0e951b92a570121ed843822 (patch)
tree2121ca2eec498958ea8c6ff495ca1d09292b386c /meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
parente89c6c4aa682b2cba8c1c50098c95b70ad6746fc (diff)
downloadpoky-be0cabf816a84c59e0e951b92a570121ed843822.tar.gz
python-smartpm: Don't ignore error if RPM transaction fails without problems
SmartPM could misinterpret RPM transaction error as success, if ts.run() (RPM Python API) returns an empty problems list. This could happen for example if the RPM database is partially corrupted such that the transaction does not have any problems like conflicts or missing dependencies, but still can't be committed. The added patch fixes the problem in the upstream sources; one of the existing patches has to be adjusted to still apply. (From OE-Core rev: 1dc5f5d5c844585eec114be9480e0e4d8e60d09c) Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python-smartpm/smart-attempt.patch')
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-attempt.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch b/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
index ec98e03c0a..5aedc88266 100644
--- a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
+++ b/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
@@ -36,7 +36,7 @@ index 9bbd952..ba6405a 100644
36 finally: 36 finally:
37 del getTS.ts 37 del getTS.ts
38 cb.grabOutput(False) 38 cb.grabOutput(False)
39+ if probs and sysconf.has("attempt-install", soft=True): 39+ if (probs is not None) and sysconf.has("attempt-install", soft=True):
40+ def remove_conflict(pkgNEVR): 40+ def remove_conflict(pkgNEVR):
41+ for key in changeset.keys(): 41+ for key in changeset.keys():
42+ if pkgNEVR == str(key): 42+ if pkgNEVR == str(key):
@@ -67,8 +67,8 @@ index 9bbd952..ba6405a 100644
67+ retry = 0 67+ retry = 0
68+ 68+
69 prog.setDone() 69 prog.setDone()
70- if probs: 70- if probs is not None:
71+ if probs and (not retry): 71+ if (probs is not None) and (not retry):
72 raise Error, "\n".join([x[0] for x in probs]) 72 raise Error, "\n".join([x[0] for x in probs])
73 prog.stop() 73 prog.stop()
74+ if retry and len(changeset): 74+ if retry and len(changeset):