From: Zac Medico Date: Fri, 18 Nov 2011 21:11:05 +0000 (-0800) Subject: _prepare_self_update: detect if already called X-Git-Tag: v2.2.0_alpha76 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=c170578a89c2354a595f34b68ab55622dd942252;p=portage.git _prepare_self_update: detect if already called This is should never be triggered by portage, but it's possible that an API consumer might trigger it somehow. --- diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 9e71cfc68..4ba523cc4 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -2024,6 +2024,10 @@ def _prepare_self_update(settings): automatically clean up the temporary copies. """ + # sanity check: ensure that that this routine only runs once + if portage._bin_path != portage.const.PORTAGE_BIN_PATH: + return + # Load lazily referenced portage submodules into memory, # so imports won't fail during portage upgrade/downgrade. _preload_elog_modules(settings)