* first try... should fix package-manager too.
This commit is contained in:
+2
-2
@@ -217,11 +217,11 @@ def generate_upgrade_order(A):
|
|||||||
G_f, order = plan_upgrade(A)
|
G_f, order = plan_upgrade(A)
|
||||||
return order
|
return order
|
||||||
|
|
||||||
def generate_base_upgrade(A):
|
def generate_base_upgrade():
|
||||||
# all the packages of the system.base must be installed on the system.
|
# all the packages of the system.base must be installed on the system.
|
||||||
# method returns the currently needed system.base component install and
|
# method returns the currently needed system.base component install and
|
||||||
# upgrade needs
|
# upgrade needs
|
||||||
base = upgrade_base(A, ignore_package_conflicts = True)
|
base = upgrade_base(ignore_package_conflicts=True)
|
||||||
return list(base)
|
return list(base)
|
||||||
|
|
||||||
def generate_conflicts(A):
|
def generate_conflicts(A):
|
||||||
|
|||||||
+4
-4
@@ -295,12 +295,12 @@ def is_upgradable(name, ignore_build = False):
|
|||||||
else:
|
else:
|
||||||
return build < pkg.build
|
return build < pkg.build
|
||||||
|
|
||||||
def upgrade_base(A = set(), ignore_package_conflicts = False):
|
def upgrade_base(ignore_package_conflicts=False):
|
||||||
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.get_option('ignore_safety'):
|
||||||
if ctx.componentdb.has_component('system.base'):
|
if ctx.componentdb.has_component('system.base'):
|
||||||
systembase = set(ctx.componentdb.get_union_comp('system.base').packages)
|
systembase = set(ctx.componentdb.get_union_comp('system.base').packages)
|
||||||
extra_installs = filter(lambda x: not ctx.installdb.is_installed(x), systembase - set(A))
|
extra_installs = filter(lambda x: not ctx.installdb.is_installed(x), systembase)
|
||||||
if extra_installs:
|
if extra_installs:
|
||||||
ctx.ui.warning(_('Safety switch: Following packages in system.base will be installed: ') +
|
ctx.ui.warning(_('Safety switch: Following packages in system.base will be installed: ') +
|
||||||
util.strlist(extra_installs))
|
util.strlist(extra_installs))
|
||||||
@@ -339,7 +339,7 @@ def install_pkg_names(A, reinstall = False):
|
|||||||
ctx.ui.info(_('No packages to install.'))
|
ctx.ui.info(_('No packages to install.'))
|
||||||
return
|
return
|
||||||
|
|
||||||
A |= upgrade_base(A)
|
A |= upgrade_base()
|
||||||
|
|
||||||
if not ctx.config.get_option('ignore_dependency'):
|
if not ctx.config.get_option('ignore_dependency'):
|
||||||
G_f, order = plan_install_pkg_names(A)
|
G_f, order = plan_install_pkg_names(A)
|
||||||
@@ -466,7 +466,7 @@ def upgrade_pkg_names(A = []):
|
|||||||
ctx.ui.info(_('No packages to upgrade.'))
|
ctx.ui.info(_('No packages to upgrade.'))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
A |= upgrade_base(A)
|
A |= upgrade_base()
|
||||||
|
|
||||||
ctx.ui.debug('A = %s' % str(A))
|
ctx.ui.debug('A = %s' % str(A))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user