Add ignore_safety to pisi.conf
This commit is contained in:
@@ -75,6 +75,7 @@ class GeneralDefaults:
|
|||||||
package_cache = False
|
package_cache = False
|
||||||
package_cache_limit = 0
|
package_cache_limit = 0
|
||||||
bandwidth_limit = 0
|
bandwidth_limit = 0
|
||||||
|
ignore_safety = False
|
||||||
ignore_delta = False
|
ignore_delta = False
|
||||||
|
|
||||||
class BuildDefaults:
|
class BuildDefaults:
|
||||||
|
|||||||
@@ -537,7 +537,7 @@ class Builder:
|
|||||||
|
|
||||||
build_deps = self.spec.source.buildDependencies
|
build_deps = self.spec.source.buildDependencies
|
||||||
|
|
||||||
if not ctx.get_option('ignore_safety'):
|
if not ctx.config.values.general.ignore_safety and not ctx.get_option('ignore_safety'):
|
||||||
if self.componentdb.has_component('system.devel'):
|
if self.componentdb.has_component('system.devel'):
|
||||||
build_deps_names = set([x.package for x in build_deps])
|
build_deps_names = set([x.package for x in build_deps])
|
||||||
devel_deps_names = set(self.componentdb.get_component('system.devel').packages)
|
devel_deps_names = set(self.componentdb.get_component('system.devel').packages)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ def remove(A, ignore_dep = False, ignore_safety = False):
|
|||||||
# filter packages that are not installed
|
# filter packages that are not installed
|
||||||
A_0 = A = set(A)
|
A_0 = A = set(A)
|
||||||
|
|
||||||
if not ctx.get_option('ignore_safety') and not ignore_safety:
|
if not ctx.get_option('ignore_safety') and not ctx.config.values.general.ignore_safety and not ignore_safety:
|
||||||
if componentdb.has_component('system.base'):
|
if componentdb.has_component('system.base'):
|
||||||
systembase = set(componentdb.get_union_component('system.base').packages)
|
systembase = set(componentdb.get_union_component('system.base').packages)
|
||||||
refused = A.intersection(systembase)
|
refused = A.intersection(systembase)
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ def upgrade_base(A = set()):
|
|||||||
installdb = pisi.db.installdb.InstallDB()
|
installdb = pisi.db.installdb.InstallDB()
|
||||||
componentdb = pisi.db.componentdb.ComponentDB()
|
componentdb = pisi.db.componentdb.ComponentDB()
|
||||||
ignore_build = ctx.get_option('ignore_build_no')
|
ignore_build = ctx.get_option('ignore_build_no')
|
||||||
if not ctx.get_option('ignore_safety'):
|
if not ctx.config.values.general.ignore_safety and not ctx.get_option('ignore_safety'):
|
||||||
if componentdb.has_component('system.base'):
|
if componentdb.has_component('system.base'):
|
||||||
systembase = set(componentdb.get_union_component('system.base').packages)
|
systembase = set(componentdb.get_union_component('system.base').packages)
|
||||||
extra_installs = filter(lambda x: not installdb.has_package(x), systembase - set(A))
|
extra_installs = filter(lambda x: not installdb.has_package(x), systembase - set(A))
|
||||||
|
|||||||
Reference in New Issue
Block a user