Kaydet (Commit) 0e2353d6 authored tarafından root's avatar root

force system.base update when install any package

üst 859c7181
......@@ -40,9 +40,12 @@ def install_pkg_names(A, reinstall=False, extra=False):
installdb = inary.db.installdb.InstallDB()
packagedb = inary.db.packagedb.PackageDB()
componentdb = inary.db.componentdb.ComponentDB()
# A was a list, remove duplicates
A_0 = A = set(A)
# filter packages that are already installed
if not reinstall:
Ap = set([x for x in A if not installdb.has_package(x)])
......@@ -53,6 +56,11 @@ def install_pkg_names(A, reinstall=False, extra=False):
ctx.ui.info(util.format_by_columns(sorted(d)))
A = Ap
if componentdb.has_component('system.base'):
systembase = componentdb.get_union_component('system.base').packages
for pkg in systembase:
A.add(pkg)
if len(A) == 0:
ctx.ui.info(_('No packages to install.'))
return True
......@@ -65,7 +73,6 @@ def install_pkg_names(A, reinstall=False, extra=False):
order = plan_install_pkg_names(A, reinstall)
else:
order = list(A)
componentdb = inary.db.componentdb.ComponentDB()
# Bug 4211
if componentdb.has_component('system.base'):
......
......@@ -124,8 +124,8 @@ def find_upgrades(packages, replaces):
Ap.append(i_pkg)
ds.append(i_pkg)
else:
ctx.ui.info(_('Package \"{0.name}\" is already at the latest release {0.release}.').format(
pkg), True)
ctx.ui.verbose(_('Package \"{0.name}\" is already at the latest release {0.release}.').format(
pkg))
if debug and ds:
ctx.ui.info(_('The following packages have different sha1sum:'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment