diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-04-03 01:20:00 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-04-03 01:20:00 +0000 |
commit | 578664d15a43a3750b6a09220355ce2d70b1adf9 (patch) | |
tree | 65e6492deb8e5c61ef9991078380c3dae71dd0c2 | |
parent | c922791ab3d4413f78c55184aef55e2c9ef1401c (diff) | |
download | portage-578664d15a43a3750b6a09220355ce2d70b1adf9.tar.gz portage-578664d15a43a3750b6a09220355ce2d70b1adf9.tar.bz2 portage-578664d15a43a3750b6a09220355ce2d70b1adf9.zip |
Generate an error if there are no ebuilds found for a package that's
specified on the commandline.
svn path=/main/trunk/; revision=13282
-rwxr-xr-x | bin/egencache | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/egencache b/bin/egencache index 66af2a75a..923bd1664 100755 --- a/bin/egencache +++ b/bin/egencache @@ -116,8 +116,10 @@ class GenCache(object): if cp_iter is not None: self._cp_set = set(cp_iter) cp_iter = iter(self._cp_set) + self._cp_missing = self._cp_set.copy() else: self._cp_set = None + self._cp_missing = set() self._regen = _emerge.MetadataRegen(portdb, cp_iter=cp_iter, consumer=self._metadata_callback, max_jobs=max_jobs, max_load=max_load) @@ -131,6 +133,7 @@ class GenCache(object): def _metadata_callback(self, cpv, ebuild_path, repo_path, metadata): self._existing_nodes.add(cpv) + self._cp_missing.discard(portage.cpv_getkey(cpv)) if metadata is not None: if metadata.get('EAPI') == '0': del metadata['EAPI'] @@ -174,6 +177,13 @@ class GenCache(object): self._regen.run() self.returncode |= self._regen.returncode + if self._cp_missing: + self.returncode |= 1 + for cp in sorted(self._cp_missing): + writemsg_level( + "No ebuilds found for '%s'\n" % (cp,), + level=logging.ERROR, noiselevel=-1) + trg_cache = self._trg_cache dead_nodes = None if self._global_cleanse: |