* system.base packages and packages other than system.base's have no dependency
relationship. So this is the quickest and safest way i think by not touching the dependency code, and leaving it generic for any package. The dependency ordering relations of these two groups (system.base packages and other than system.base packages) are handled within each other. the systembase_order holds this relational dependency order, the "order" variable holds the not system.base packages relational dependency order. So by combining these as systebase_order + order the dependency relations should not be harmed and the system.base packages first rule is satisfied. BUG:FIXED:4211
This commit is contained in:
+1
-1
@@ -222,7 +222,7 @@ def generate_base_upgrade(A):
|
|||||||
# 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(A, ignore_package_conflicts = True)
|
||||||
return list(base)
|
return base
|
||||||
|
|
||||||
def generate_conflicts(A):
|
def generate_conflicts(A):
|
||||||
# returns the conflicting packages list of the to be installed packages.
|
# returns the conflicting packages list of the to be installed packages.
|
||||||
|
|||||||
+7
-3
@@ -298,7 +298,7 @@ def upgrade_base(A = set(), ignore_package_conflicts = False):
|
|||||||
util.strlist(extra_upgrades))
|
util.strlist(extra_upgrades))
|
||||||
G_f, upgrade_order = plan_upgrade(extra_upgrades, ignore_build)
|
G_f, upgrade_order = plan_upgrade(extra_upgrades, ignore_build)
|
||||||
# return packages that must be added to any installation
|
# return packages that must be added to any installation
|
||||||
return set(install_order + upgrade_order)
|
return install_order + upgrade_order
|
||||||
else:
|
else:
|
||||||
ctx.ui.warning(_('Safety switch: the component system.base cannot be found'))
|
ctx.ui.warning(_('Safety switch: the component system.base cannot be found'))
|
||||||
return set()
|
return set()
|
||||||
@@ -325,7 +325,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)
|
systembase_order = upgrade_base(A)
|
||||||
|
|
||||||
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)
|
||||||
@@ -333,6 +333,8 @@ def install_pkg_names(A, reinstall = False):
|
|||||||
G_f = None
|
G_f = None
|
||||||
order = list(A)
|
order = list(A)
|
||||||
|
|
||||||
|
order = systembase_order + order
|
||||||
|
|
||||||
if len(order) > 1:
|
if len(order) > 1:
|
||||||
ctx.ui.info(_("Following packages will be installed in the respective "
|
ctx.ui.info(_("Following packages will be installed in the respective "
|
||||||
"order to satisfy dependencies:\n") + util.strlist(order))
|
"order to satisfy dependencies:\n") + util.strlist(order))
|
||||||
@@ -448,7 +450,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)
|
systembase_order = upgrade_base(A)
|
||||||
|
|
||||||
ctx.ui.debug('A = %s' % str(A))
|
ctx.ui.debug('A = %s' % str(A))
|
||||||
|
|
||||||
@@ -458,6 +460,8 @@ def upgrade_pkg_names(A = []):
|
|||||||
G_f = None
|
G_f = None
|
||||||
order = list(A)
|
order = list(A)
|
||||||
|
|
||||||
|
order = systembase_order + order
|
||||||
|
|
||||||
if not ctx.get_option('ignore_package_conflicts'):
|
if not ctx.get_option('ignore_package_conflicts'):
|
||||||
conflicts = check_conflicts(order, ctx.packagedb)
|
conflicts = check_conflicts(order, ctx.packagedb)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user