From 1dc5f5d5c844585eec114be9480e0e4d8e60d09c Mon Sep 17 00:00:00 2001 From: "Klauer, Daniel" Date: Tue, 17 May 2016 12:58:04 +0000 Subject: 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. Signed-off-by: Daniel Klauer Signed-off-by: Richard Purdie --- meta/recipes-devtools/python/python-smartpm/smart-attempt.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'meta/recipes-devtools/python/python-smartpm/smart-attempt.patch') 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 finally: del getTS.ts cb.grabOutput(False) -+ if probs and sysconf.has("attempt-install", soft=True): ++ if (probs is not None) and sysconf.has("attempt-install", soft=True): + def remove_conflict(pkgNEVR): + for key in changeset.keys(): + if pkgNEVR == str(key): @@ -67,8 +67,8 @@ index 9bbd952..ba6405a 100644 + retry = 0 + prog.setDone() -- if probs: -+ if probs and (not retry): +- if probs is not None: ++ if (probs is not None) and (not retry): raise Error, "\n".join([x[0] for x in probs]) prog.stop() + if retry and len(changeset): -- cgit v1.2.3