summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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