~evfool/update-manager/fix665173

« back to all changes in this revision

Viewing changes to DistUpgrade/DistUpgradeCache.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:
349
349
                return False
350
350
        return True
351
351
 
352
 
    def markInstall(self, pkg, reason=""):
 
352
    def mark_install(self, pkg, reason=""):
353
353
        logging.debug("Installing '%s' (%s)" % (pkg, reason))
354
354
        if self.has_key(pkg):
355
355
            self[pkg].mark_install()
358
358
                #raise (SystemError, "Installing '%s' failed" % pkg)
359
359
                return False
360
360
        return True
361
 
    def markUpgrade(self, pkg, reason=""):
 
361
    def mark_upgrade(self, pkg, reason=""):
362
362
        logging.debug("Upgrading '%s' (%s)" % (pkg, reason))
363
363
        if self.has_key(pkg) and self[pkg].is_installed:
364
364
            self[pkg].mark_upgrade()
366
366
                logging.error("Upgrading '%s' failed" % pkg)
367
367
                return False
368
368
        return True
369
 
    def markRemove(self, pkg, reason=""):
 
369
    def mark_remove(self, pkg, reason=""):
370
370
        logging.debug("Removing '%s' (%s)" % (pkg, reason))
371
371
        if self.has_key(pkg):
372
372
            self[pkg].mark_delete()
373
 
    def markPurge(self, pkg, reason=""):
 
373
    def mark_purge(self, pkg, reason=""):
374
374
        logging.debug("Purging '%s' (%s)" % (pkg, reason))
375
375
        if self.has_key(pkg):
376
376
            self._depcache.mark_delete(self[pkg]._pkg,True)