From c170578a89c2354a595f34b68ab55622dd942252 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 18 Nov 2011 13:11:05 -0800 Subject: [PATCH] _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. --- pym/portage/package/ebuild/doebuild.py | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.26.2