diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-10 18:39:42 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-10 18:46:23 -0700 |
commit | 722000c545d7c23764382685d70819e42c11ead8 (patch) | |
tree | 2d5c1ce34929ccbfac1091949cc6c8b22477e268 /pym/_emerge | |
parent | 7aac6b6be6092ceb7f778534efd95c7f6a35a55c (diff) | |
download | portage-722000c545d7c23764382685d70819e42c11ead8.tar.gz portage-722000c545d7c23764382685d70819e42c11ead8.tar.bz2 portage-722000c545d7c23764382685d70819e42c11ead8.zip |
Remove pkg_nofetch code from the fetch() function since it's currently broken (doebuild_environment raises TypeError due to missing mydbapi parameter) and this is a poor place to spawn pkg_nofetch anyway, especially given that the caller does not even pass in a portdbapi instance. For now, relocate the pkg_nofetch execution to EbuildBuild so that it works for emerge. TODO: Add pkg_nofetch support to fetch() callers where appropriate.
Diffstat (limited to 'pym/_emerge')
-rw-r--r-- | pym/_emerge/EbuildBuild.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/pym/_emerge/EbuildBuild.py b/pym/_emerge/EbuildBuild.py index 28ef7d074..6d42b1fbb 100644 --- a/pym/_emerge/EbuildBuild.py +++ b/pym/_emerge/EbuildBuild.py @@ -193,19 +193,18 @@ class EbuildBuild(CompositeTask): self._start_task(build, self._build_exit) def _fetch_failed(self): - # If RESTRICT=fetch is set, then the nofetch phase - # should have been executed already, so don't do - # it again. - if 'fetch' in self.pkg.metadata.restrict or \ - 'nofetch' not in self.pkg.metadata.defined_phases: + # We only call the pkg_nofetch phase if either RESTRICT=fetch + # is set or the package has explicitly overridden the default + # pkg_nofetch implementation. This allows specialized messages + # to be displayed for problematic packages even though they do + # not set RESTRICT=fetch (bug #336499). + + if 'fetch' not in self.pkg.metadata.restrict and \ + 'nofetch' not in self.pkg.metadata.defined_phases: self._unlock_builddir() self.wait() return - # The package has defined a pkg_nofetch phase, even - # though RESTRICT=fetch is not set, so go ahead and - # run it. This allows specialized messages to be - # displayed for problematic packages (bug #336499). self.returncode = None nofetch_phase = EbuildPhase(background=self.background, phase='nofetch', scheduler=self.scheduler, settings=self.settings) |