* this is wrong... revert

system.base may not depend outside, at least for now. But also i dont 
see "not depending" as a bad thing (TM) either.
This commit is contained in:
Faik Uygur
2006-11-30 21:06:49 +00:00
parent d6019d96d0
commit a232a48558
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -217,11 +217,11 @@ def generate_upgrade_order(A):
G_f, order = plan_upgrade(A)
return order
def generate_base_upgrade():
def generate_base_upgrade(A):
# all the packages of the system.base must be installed on the system.
# method returns the currently needed system.base component install and
# upgrade needs
base = upgrade_base(ignore_package_conflicts=True)
base = upgrade_base(A, ignore_package_conflicts = True)
return list(base)
def generate_conflicts(A):
+4 -4
View File
@@ -295,12 +295,12 @@ def is_upgradable(name, ignore_build = False):
else:
return build < pkg.build
def upgrade_base(ignore_package_conflicts=False):
def upgrade_base(A = set(), ignore_package_conflicts = False):
ignore_build = ctx.get_option('ignore_build_no')
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)
extra_installs = filter(lambda x: not ctx.installdb.is_installed(x), systembase - set(A))
if extra_installs:
ctx.ui.warning(_('Safety switch: Following packages in system.base will be installed: ') +
util.strlist(extra_installs))
@@ -339,7 +339,7 @@ def install_pkg_names(A, reinstall = False):
ctx.ui.info(_('No packages to install.'))
return
A |= upgrade_base()
A |= upgrade_base(A)
if not ctx.config.get_option('ignore_dependency'):
G_f, order = plan_install_pkg_names(A)
@@ -466,7 +466,7 @@ def upgrade_pkg_names(A = []):
ctx.ui.info(_('No packages to upgrade.'))
return True
A |= upgrade_base()
A |= upgrade_base(A)
ctx.ui.debug('A = %s' % str(A))