diff --git a/pisi/actionsapi/variables.py b/pisi/actionsapi/variables.py index 4e4eb00f..e36145ad 100644 --- a/pisi/actionsapi/variables.py +++ b/pisi/actionsapi/variables.py @@ -95,7 +95,8 @@ class Generals: def __init__(self): self.values = ctx.config.values self.architecture = self.values.general.architecture - + self.distribution = self.values.general.distribution + self.distribution_release = self.values.general.distribution_release # As we import this module from build.py, we can't init glb as a # singleton here. Or else Python will bug us with NoneType errors diff --git a/pisi/operations/install.py b/pisi/operations/install.py index 2a2ca969..db1d2280 100644 --- a/pisi/operations/install.py +++ b/pisi/operations/install.py @@ -160,13 +160,13 @@ def install_pkg_files(package_URIs, reinstall = False): if not ctx.get_option('ignore_check'): for x in d_t.keys(): pkg = d_t[x] - if pkg.distributionRelease != ctx.config.values.get("general", "distribution_release"): + if pkg.distributionRelease != ctx.config.values.general.distribution_release: raise Exception(_('Package %s is not compatible with your distribution release %s %s.') \ - % (x, ctx.config.values.get("general", "distribution"), \ - ctx.config.values.get("general", "distribution_release"))) - if pkg.architecture != ctx.config.values.get("general", "architecture"): + % (x, ctx.config.values.general.distribution, \ + ctx.config.values.general.distribution_release)) + if pkg.architecture != ctx.config.values.general.architecture: raise Exception(_('Package %s (%s) is not compatible with your %s architecture.') \ - % (x, pkg.architecture, ctx.config.values.get("general", "architecture"))) + % (x, pkg.architecture, ctx.config.values.general.architecture)) def satisfiesDep(dep): # is dependency satisfied among available packages