~ubuntu-core-dev/update-manager/main

« back to all changes in this revision

Viewing changes to DistUpgrade/DistUpgradeViewKDE.py

  • Committer: Michael Vogt
  • Date: 2011-02-23 17:11:23 UTC
  • Revision ID: michael.vogt@ubuntu.com-20110223171123-wrbx0xuqxvkporh4
merged lp:~thibault-lemaitre/ubuntu/natty/update-manager/from_pkg.isInstalled_to_pkg.is_installed
that fixes a bunch of deprecated python-apt issues (many thanks!)

Show diffs side-by-side

added added

removed removed

Lines of Context:
850
850
 
851
851
  cache = apt.Cache()
852
852
  for pkg in sys.argv[1:]:
853
 
    if cache[pkg].isInstalled and not cache[pkg].isUpgradable: 
854
 
      cache[pkg].markDelete(purge=True)
 
853
    if cache[pkg].is_installed and not cache[pkg].isUpgradable: 
 
854
      cache[pkg].mark_delete(purge=True)
855
855
    else:
856
 
      cache[pkg].markInstall()
 
856
      cache[pkg].mark_install()
857
857
  cache.commit(view._fetchProgress,view._installProgress)
858
858
 
859
859
  # keep the window open