add --ignore-check to pisi install command too, to get rid of architecture and distribution checks
This commit is contained in:
@@ -49,6 +49,8 @@ expanded to package names.
|
|||||||
help=_("Do not take build no into account."))
|
help=_("Do not take build no into account."))
|
||||||
group.add_option("--reinstall", action="store_true",
|
group.add_option("--reinstall", action="store_true",
|
||||||
default=False, help=_("Reinstall already installed packages"))
|
default=False, help=_("Reinstall already installed packages"))
|
||||||
|
group.add_option("--ignore-check", action="store_true",
|
||||||
|
default=False, help=_("Skip distribution release and architecture check"))
|
||||||
group.add_option("--ignore-file-conflicts", action="store_true",
|
group.add_option("--ignore-file-conflicts", action="store_true",
|
||||||
default=False, help=_("Ignore file conflicts"))
|
default=False, help=_("Ignore file conflicts"))
|
||||||
group.add_option("--ignore-package-conflicts", action="store_true",
|
group.add_option("--ignore-package-conflicts", action="store_true",
|
||||||
|
|||||||
@@ -157,15 +157,16 @@ def install_pkg_files(package_URIs, reinstall = False):
|
|||||||
dfn[name] = x
|
dfn[name] = x
|
||||||
|
|
||||||
# check packages' DistributionReleases and Architecture
|
# check packages' DistributionReleases and Architecture
|
||||||
for x in d_t.keys():
|
if not ctx.get_option('ignore_check'):
|
||||||
pkg = d_t[x]
|
for x in d_t.keys():
|
||||||
if pkg.distributionRelease != ctx.config.values.get("general", "distribution_release"):
|
pkg = d_t[x]
|
||||||
raise Exception(_('Package %s is not compatible with your distribution release %s %s.') \
|
if pkg.distributionRelease != ctx.config.values.get("general", "distribution_release"):
|
||||||
% (x, ctx.config.values.get("general", "distribution"), \
|
raise Exception(_('Package %s is not compatible with your distribution release %s %s.') \
|
||||||
ctx.config.values.get("general", "distribution_release")))
|
% (x, ctx.config.values.get("general", "distribution"), \
|
||||||
if pkg.architecture != ctx.config.values.get("general", "architecture"):
|
ctx.config.values.get("general", "distribution_release")))
|
||||||
raise Exception(_('Package %s (%s) is not compatible with your %s architecture.') \
|
if pkg.architecture != ctx.config.values.get("general", "architecture"):
|
||||||
% (x, pkg.architecture, ctx.config.values.get("general", "architecture")))
|
raise Exception(_('Package %s (%s) is not compatible with your %s architecture.') \
|
||||||
|
% (x, pkg.architecture, ctx.config.values.get("general", "architecture")))
|
||||||
|
|
||||||
def satisfiesDep(dep):
|
def satisfiesDep(dep):
|
||||||
# is dependency satisfied among available packages
|
# is dependency satisfied among available packages
|
||||||
|
|||||||
Reference in New Issue
Block a user