summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-10-06 05:45:55 +0000
committerZac Medico <zmedico@gentoo.org>2009-10-06 05:45:55 +0000
commit2286d42ec0fd630eda45c2b1dbb867b98be76668 (patch)
treeb977366e61497bb8bffdec5517bf8517e56eb512
parentcb799ed692e17b1de97dba37e1b2d04cca181405 (diff)
downloadportage-2286d42ec0fd630eda45c2b1dbb867b98be76668.tar.gz
portage-2286d42ec0fd630eda45c2b1dbb867b98be76668.tar.bz2
portage-2286d42ec0fd630eda45c2b1dbb867b98be76668.zip
When restarting emerge, don't trust sys.argv[0] since eselect-python may
modify it. svn path=/main/trunk/; revision=14499
-rw-r--r--pym/_emerge/Scheduler.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index b6f08307d..e1eb2672f 100644
--- a/pym/_emerge/Scheduler.py
+++ b/pym/_emerge/Scheduler.py
@@ -753,7 +753,9 @@ class Scheduler(PollScheduler):
mtimedb["resume"]["mergelist"].remove(list(pkg))
mtimedb.commit()
portage.run_exitfuncs()
- mynewargv = [sys.argv[0], "--resume"]
+ # Don't trust sys.argv[0] here because eselect-python may modify it.
+ emerge_binary = os.path.join(portage.const.PORTAGE_BIN_PATH, 'emerge')
+ mynewargv = [emerge_binary, "--resume"]
resume_opts = self.myopts.copy()
# For automatic resume, we need to prevent
# any of bad_resume_opts from leaking in