- handle reversed up... this is need for pm.

ex: gaim -> pidgin ( gaim is replaced by pidgin 
  in repository)

  So if gaim is installed... pisi lu shows gaim.

  All these upgrade gaim to pidgin:

  pisi up, pisi up gaim, pisi up pidgin
This commit is contained in:
Faik Uygur
2007-07-02 09:19:40 +00:00
parent 85af976ed2
commit e325517ed6
+9
View File
@@ -390,6 +390,15 @@ def upgrade_pkg_names(A = []):
if x.endswith(ctx.const.package_suffix):
ctx.ui.debug(_("Warning: package *name* ends with '.pisi'"))
# Handling of replacement packages
if x in replaces.values():
Ap.append(x)
pkg = ctx.packagedb.get_package(x)
for r in pkg.replaces:
if pisi.replace.installed_package_replaced(r):
replaced.append(r.package)
continue
if x in replaces.keys():
Ap.append(replaces[x])
replaced.append(x)