summaryrefslogtreecommitdiffstats
path: root/pyanaconda/installclass.py
diff options
context:
space:
mode:
authorBrian C. Lane <bcl@redhat.com>2012-02-09 13:19:43 -0800
committerBrian C. Lane <bcl@redhat.com>2012-02-10 11:01:30 -0800
commitc0e70ff628cfee0e1bbd3814766ab3dd6200af2d (patch)
treed5442d6353924d9f9307b85721b609e7cd538ae4 /pyanaconda/installclass.py
parent9e4015693a7bcea3efc6769b5785d883efb244ad (diff)
downloadanaconda-c0e70ff628cfee0e1bbd3814766ab3dd6200af2d.tar.gz
anaconda-c0e70ff628cfee0e1bbd3814766ab3dd6200af2d.tar.xz
anaconda-c0e70ff628cfee0e1bbd3814766ab3dd6200af2d.zip
Be more verbose about upgrade failures (#735060)
When an installed system cannot be upgraded it may be helpful to know if it was the product, version or arch that didn't match. This propagates that info up from productUpgradable so that it can be show to the user.
Diffstat (limited to 'pyanaconda/installclass.py')
-rw-r--r--pyanaconda/installclass.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py
index f2774dac6..8aea1bb41 100644
--- a/pyanaconda/installclass.py
+++ b/pyanaconda/installclass.py
@@ -201,6 +201,11 @@ class BaseInstallClass(object):
pass
def productUpgradable(self, arch, oldprod, oldver):
+ """ Return a tuple with:
+ (Upgradable True|False, dict of tests and status)
+
+ The dict has True|False for: product, version, arch tests.
+ """
def archesEq(a, b):
import re
@@ -209,7 +214,12 @@ class BaseInstallClass(object):
else:
return a == b
- return self.productMatches(oldprod) and self.versionMatches(oldver) and archesEq(arch, productArch)
+ result = { "product" : self.productMatches(oldprod),
+ "version" : self.versionMatches(oldver),
+ "arch" : archesEq(arch, productArch)
+ }
+
+ return (all(result.values()), result)
def setNetworkOnbootDefault(self, network):
pass