diff --git a/pisi/build.py b/pisi/build.py index 998e1d76..7544d422 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -406,7 +406,7 @@ class Builder: build_deps = self.spec.source.buildDependencies - if not ctx.get_option('bypass_safety'): + if not ctx.get_option('ignore_safety'): if ctx.componentdb.has_component('system.devel'): build_deps_names = set([x.package for x in build_deps]) devel_deps_names = set(ctx.componentdb.get_component('system.devel').packages) diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index fa8f5def..1428b877 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -447,7 +447,7 @@ to be downloaded from a repository containing sources. group.add_option("--ignore-action-errors", action="store_true", default=False, help=_("Bypass errors from ActionsAPI")) - group.add_option("--bypass-safety", action="store_true", + group.add_option("--ignore-safety", action="store_true", default=False, help=_("Bypass safety switch")) group.add_option("--ignore-file-conflicts", action="store_true", default=False, help=_("Ignore file conflicts")) @@ -554,7 +554,7 @@ class PackageOp(Command): ignoredep_opt(self, group) group.add_option("--ignore-comar", action="store_true", default=False, help=_("Bypass comar configuration agent")) - group.add_option("--bypass-safety", action="store_true", + group.add_option("--ignore-safety", action="store_true", default=False, help=_("Bypass safety switch")) group.add_option("-n", "--dry-run", action="store_true", default=False, help = _("Do not perform any action, just show what would be done")) diff --git a/pisi/operations.py b/pisi/operations.py index adcb291f..2eed35db 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -245,7 +245,7 @@ def check_conflicts(order, packagedb): if not ctx.ui.confirm(_('Remove the following conflicting packages?')): raise Error(_("Conflicts remain")) - if remove(list(C), ignore_dep=True, bypass_safety=True) == False: + if remove(list(C), ignore_dep=True, ignore_safety=True) == False: raise Error(_("Conflicts remain")) def expand_components(A): @@ -272,7 +272,7 @@ def is_upgradable(name, ignore_build = False): def upgrade_base(A = set()): ignore_build = ctx.get_option('ignore_build_no') - if not ctx.get_option('bypass_safety'): + if not ctx.get_option('ignore_safety'): if ctx.componentdb.has_component('system.base'): systembase = set(ctx.componentdb.get_union_comp('system.base').packages) extra_installs = filter(lambda x: not ctx.installdb.is_installed(x), systembase - A) @@ -549,7 +549,7 @@ def plan_upgrade(A, ignore_build = False): check_conflicts(order, ctx.packagedb) return G_f, order -def remove(A, ignore_dep = False, bypass_safety = False): +def remove(A, ignore_dep = False, ignore_safety = False): """remove set A of packages from system (A is a list of package names)""" A = [str(x) for x in A] @@ -557,7 +557,7 @@ def remove(A, ignore_dep = False, bypass_safety = False): # filter packages that are not installed A_0 = A = expand_components(set(A)) - if not ctx.get_option('bypass_safety') and not bypass_safety: + if not ctx.get_option('ignore_safety') and not ignore_safety: if ctx.componentdb.has_component('system.base'): systembase = set(ctx.componentdb.get_union_comp('system.base').packages) refused = A.intersection(systembase)