summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/EbuildFetchonly.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-26 23:37:34 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-26 23:37:34 +0000
commit7a6a2598c417b0079036a37e3203d3451bb49654 (patch)
tree8adbb1edb29eb85d0da461f35aca5227426c6196 /pym/_emerge/EbuildFetchonly.py
parenta24887033140f28a94c7e247e8ac3d48b8e2280e (diff)
downloadportage-7a6a2598c417b0079036a37e3203d3451bb49654.tar.gz
portage-7a6a2598c417b0079036a37e3203d3451bb49654.tar.bz2
portage-7a6a2598c417b0079036a37e3203d3451bb49654.zip
Bug #286522 - Check all portdbapi.findname return values in case it
returns None, and raise 'ebuild not found' exceptions when necessary. svn path=/main/trunk/; revision=14442
Diffstat (limited to 'pym/_emerge/EbuildFetchonly.py')
-rw-r--r--pym/_emerge/EbuildFetchonly.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/_emerge/EbuildFetchonly.py b/pym/_emerge/EbuildFetchonly.py
index 256a06c69..147e824f2 100644
--- a/pym/_emerge/EbuildFetchonly.py
+++ b/pym/_emerge/EbuildFetchonly.py
@@ -17,6 +17,8 @@ class EbuildFetchonly(SlotObject):
pkg = self.pkg
portdb = pkg.root_config.trees["porttree"].dbapi
ebuild_path = portdb.findname(pkg.cpv)
+ if ebuild_path is None:
+ raise AssertionError("ebuild not found for '%s'" % pkg.cpv)
settings.setcpv(pkg)
debug = settings.get("PORTAGE_DEBUG") == "1"
@@ -64,6 +66,8 @@ class EbuildFetchonly(SlotObject):
root_config = pkg.root_config
portdb = root_config.trees["porttree"].dbapi
ebuild_path = portdb.findname(pkg.cpv)
+ if ebuild_path is None:
+ raise AssertionError("ebuild not found for '%s'" % pkg.cpv)
debug = settings.get("PORTAGE_DEBUG") == "1"
retval = portage.doebuild(ebuild_path, "fetch",
self.settings["ROOT"], self.settings, debug=debug,