* bypass_safety to ignore_safety for conveniency purpose.
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
@@ -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"))
|
||||
|
||||
+4
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user