get arch,dist and dist_release of pisi.conf from variables

This commit is contained in:
Faik Uygur
2010-01-28 12:55:12 +00:00
parent 36eefc1b7f
commit 6999bae2b7
2 changed files with 7 additions and 6 deletions
+2 -1
View File
@@ -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
+5 -5
View File
@@ -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