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

« back to all changes in this revision

Viewing changes to DistUpgrade/apt-autoinst-fixup.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:
30
30
need_fixup.add("mdadm")
31
31
 
32
32
for pkg in cache:
33
 
    if pkg.isInstalled and pkg.section == "metapackages":
 
33
    if pkg.is_installed and pkg.section == "metapackages":
34
34
        logging.debug("Found installed meta-pkg: '%s' " % pkg.name)
35
35
        dependsList = pkg._pkg.CurrentVer.DependsList
36
36
        for t in ["Depends","PreDepends","Recommends"]:
38
38
                for depOr in dependsList[t]:
39
39
                    for dep in depOr:
40
40
                        depname = dep.TargetPkg.Name
41
 
                        if (cache[depname].isInstalled and
42
 
                            cache._depcache.IsAutoInstalled(cache[depname]._pkg)):
 
41
                        if (cache[depname].is_installed and
 
42
                            cache._depcache.is_auto_installed(cache[depname]._pkg)):
43
43
                            logging.info("Removed auto-flag from package '%s'" % depname)
44
44
                            need_fixup.add(depname)
45
45