From: Zac Medico Date: Wed, 25 May 2011 00:45:06 +0000 (-0700) Subject: PackageUninstall: return early if pkg is missing X-Git-Tag: v2.2.0_alpha36~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fe1022a42fcbfd28c8eab09fe029462a68a62846;p=portage.git PackageUninstall: return early if pkg is missing --- diff --git a/pym/_emerge/PackageUninstall.py b/pym/_emerge/PackageUninstall.py index aebf55e98..eb6a947a5 100644 --- a/pym/_emerge/PackageUninstall.py +++ b/pym/_emerge/PackageUninstall.py @@ -27,9 +27,16 @@ class PackageUninstall(CompositeTask): def _start(self): - self.settings.setcpv(self.pkg) vardb = self.pkg.root_config.trees["vartree"].dbapi dbdir = vardb.getpath(self.pkg.cpv) + if not os.path.exists(dbdir): + # Apparently the package got uninstalled + # already, so we can safely return early. + self.returncode = os.EX_OK + self.wait() + return + + self.settings.setcpv(self.pkg) cat, pf = portage.catsplit(self.pkg.cpv) myebuildpath = os.path.join(dbdir, pf + ".ebuild")