diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-09-26 23:37:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-09-26 23:37:34 +0000 |
commit | 7a6a2598c417b0079036a37e3203d3451bb49654 (patch) | |
tree | 8adbb1edb29eb85d0da461f35aca5227426c6196 /pym/_emerge/Scheduler.py | |
parent | a24887033140f28a94c7e247e8ac3d48b8e2280e (diff) | |
download | portage-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/Scheduler.py')
-rw-r--r-- | pym/_emerge/Scheduler.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 78b9e57d8..b6f08307d 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -580,11 +580,8 @@ class Scheduler(PollScheduler): continue portdb = x.root_config.trees['porttree'].dbapi ebuild_path = portdb.findname(x.cpv) - if not ebuild_path: - writemsg_level( - "!!! Could not locate ebuild for '%s'.\n" \ - % x.cpv, level=logging.ERROR, noiselevel=-1) - return 1 + if ebuild_path is None: + raise AssertionError("ebuild not found for '%s'" % x.cpv) pkgsettings['O'] = os.path.dirname(ebuild_path) if not portage.digestgen([], pkgsettings, myportdb=portdb): writemsg_level( @@ -628,7 +625,10 @@ class Scheduler(PollScheduler): root_config = x.root_config portdb = root_config.trees["porttree"].dbapi quiet_config = quiet_settings[root_config.root] - quiet_config["O"] = os.path.dirname(portdb.findname(x.cpv)) + ebuild_path = portdb.findname(x.cpv) + if ebuild_path is None: + raise AssertionError("ebuild not found for '%s'" % x.cpv) + quiet_config["O"] = os.path.dirname(ebuild_path) if not portage.digestcheck([], quiet_config, strict=True): failures |= 1 |