From 89c1a7146459bd0f06d10671b6330efef4da132c Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Fri, 19 Jun 2009 06:35:29 +0000 Subject: [PATCH] Add ignore_safety to pisi.conf --- pisi/configfile.py | 1 + pisi/operations/build.py | 2 +- pisi/operations/remove.py | 2 +- pisi/operations/upgrade.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pisi/configfile.py b/pisi/configfile.py index e787cfdc..85a46aa9 100644 --- a/pisi/configfile.py +++ b/pisi/configfile.py @@ -75,6 +75,7 @@ class GeneralDefaults: package_cache = False package_cache_limit = 0 bandwidth_limit = 0 + ignore_safety = False ignore_delta = False class BuildDefaults: diff --git a/pisi/operations/build.py b/pisi/operations/build.py index 093a0b49..64aab28a 100644 --- a/pisi/operations/build.py +++ b/pisi/operations/build.py @@ -537,7 +537,7 @@ class Builder: 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'): build_deps_names = set([x.package for x in build_deps]) devel_deps_names = set(self.componentdb.get_component('system.devel').packages) diff --git a/pisi/operations/remove.py b/pisi/operations/remove.py index 1aa9a8dc..bdbb875b 100644 --- a/pisi/operations/remove.py +++ b/pisi/operations/remove.py @@ -36,7 +36,7 @@ def remove(A, ignore_dep = False, ignore_safety = False): # filter packages that are not installed 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'): systembase = set(componentdb.get_union_component('system.base').packages) refused = A.intersection(systembase) diff --git a/pisi/operations/upgrade.py b/pisi/operations/upgrade.py index 4cb792b1..6d86a529 100644 --- a/pisi/operations/upgrade.py +++ b/pisi/operations/upgrade.py @@ -237,7 +237,7 @@ def upgrade_base(A = set()): installdb = pisi.db.installdb.InstallDB() componentdb = pisi.db.componentdb.ComponentDB() 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'): systembase = set(componentdb.get_union_component('system.base').packages) extra_installs = filter(lambda x: not installdb.has_package(x), systembase - set(A))