projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53daf8d
)
PackageUninstall: return early if pkg is missing
author
Zac Medico
<zmedico@gentoo.org>
Wed, 25 May 2011 00:45:06 +0000
(17:45 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Wed, 25 May 2011 00:45:06 +0000
(17:45 -0700)
pym/_emerge/PackageUninstall.py
patch
|
blob
|
history
diff --git
a/pym/_emerge/PackageUninstall.py
b/pym/_emerge/PackageUninstall.py
index aebf55e9865cb3e967c97eaaf7d946ca398234bb..eb6a947a5272a1d13945a0841adf429b82e2f7c1 100644
(file)
--- 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")