diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-04-28 21:15:27 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-04-28 21:15:27 +0000 |
commit | fb8ac2f107a78c553e360abc3612e98550208d9f (patch) | |
tree | 5b8ab13b203db918dba08aa14697db047814fce7 | |
parent | 6487e74904a56505c87043c44245630eb1f1ee9c (diff) | |
download | portage-fb8ac2f107a78c553e360abc3612e98550208d9f.tar.gz portage-fb8ac2f107a78c553e360abc3612e98550208d9f.tar.bz2 portage-fb8ac2f107a78c553e360abc3612e98550208d9f.zip |
When a package scheduled for uninstall isn't installed anymore, move
on to the next task.
svn path=/main/trunk/; revision=10030
-rw-r--r-- | pym/_emerge/__init__.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index b03c2102b..616a4fb69 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -5172,6 +5172,8 @@ class MergeTask(object): myroot=x[1] pkg_key = x[2] pkgindex=2 + built = pkg_type != "ebuild" + installed = pkg_type == "installed" portdb = self.trees[myroot]["porttree"].dbapi bindb = self.trees[myroot]["bintree"].dbapi vartree = self.trees[myroot]["vartree"] @@ -5194,10 +5196,16 @@ class MergeTask(object): mydbapi = vardb else: raise AssertionError("Package type: '%s'" % pkg_type) - metadata.update(izip(metadata_keys, - mydbapi.aux_get(pkg_key, metadata_keys))) - built = pkg_type != "ebuild" - installed = pkg_type == "installed" + try: + metadata.update(izip(metadata_keys, + mydbapi.aux_get(pkg_key, metadata_keys))) + except KeyError: + if not installed: + raise + # A package scheduled for uninstall apparently + # isn't installed anymore. Since it's already + # been uninstalled, move on to the next task. + continue if installed: pkg_constructor = Uninstall else: |