Check individual packages' Distribution Release and architecture properties before installing them.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2009-12-11 Serdar Dalgıç <serdar@pardus.org.tr>
|
||||
* pisi/operations/install.py: Check individual packages' Distribution
|
||||
Release and architecture properties before installing them.
|
||||
|
||||
2009-12-09 Serdar Dalgıç <serdar@pardus.org.tr>
|
||||
* pisi/specfile.py: Raise meaningful warning when translations.xml has
|
||||
invalid XML, closes bug #8969
|
||||
|
||||
@@ -156,6 +156,17 @@ def install_pkg_files(package_URIs, reinstall = False):
|
||||
d_t[name] = package.metadata.package
|
||||
dfn[name] = x
|
||||
|
||||
# check packages' DistributionReleases and Architecture
|
||||
config = pisi.configfile.ConfigurationFile("/etc/pisi/pisi.conf")
|
||||
for x in d_t.keys():
|
||||
pkg = d_t[x]
|
||||
if pkg.distributionRelease != config.get("general", "distribution_release"):
|
||||
raise Exception(_('Package %s is not compatible with your distribution release %s %s.') \
|
||||
% (x, config.get("general", "distribution"), config.get("general", "distribution_release")))
|
||||
if pkg.architecture != config.get("general", "architecture"):
|
||||
raise Exception(_('Package %s (%s) is not compatible with your %s architecture.') \
|
||||
% (x, pkg.architecture, config.get("general", "architecture")))
|
||||
|
||||
def satisfiesDep(dep):
|
||||
# is dependency satisfied among available packages
|
||||
# or packages to be installed?
|
||||
|
||||
Reference in New Issue
Block a user