From b5616d53affeee118eef26836c287d439b1bce8b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 2 Mar 2007 20:07:20 +0000 Subject: [PATCH] When emerge automatically resumes, add --ignore-default-opts to the command line in order to prevent things like --ask from leaking in via EMERGE_DEFAULT_OPTS. Thanks to Peter Weller for reporting. (trunk r6132:6133) svn path=/main/branches/2.1.2/; revision=6134 --- bin/emerge | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bin/emerge b/bin/emerge index 5f23b0ce8..5a8420960 100755 --- a/bin/emerge +++ b/bin/emerge @@ -2923,7 +2923,12 @@ class MergeTask(object): fetch_env["FEATURES"] = fetch_env.get("FEATURES", "") + " -cvs" fetch_env["PORTAGE_NICENESS"] = "0" fetch_args = [sys.argv[0], "--resume", "--fetchonly"] - for myopt, myarg in self.myopts.iteritems(): + resume_opts = self.myopts.copy() + # For automatic resume, we need to prevent + # any of bad_resume_opts from leaking in + # via EMERGE_DEFAULT_OPTS. + resume_opts["--ignore-default-opts"] = True + for myopt, myarg in resume_opts.iteritems(): if myopt not in bad_resume_opts: if myarg is True: fetch_args.append(myopt) @@ -2932,6 +2937,8 @@ class MergeTask(object): portage.portage_exec.spawn(fetch_args, env=fetch_env, fd_pipes=fd_pipes, returnpid=True) logfile.close() # belongs to the spawned process + del fetch_log, logfile, fd_pipes, fetch_env, fetch_args, \ + resume_opts mergecount=0 for x in mymergelist: @@ -3180,7 +3187,12 @@ class MergeTask(object): mtimedb.commit() portage.run_exitfuncs() mynewargv=[sys.argv[0],"--resume"] - for myopt, myarg in self.myopts.iteritems(): + resume_opts = self.myopts.copy() + # For automatic resume, we need to prevent + # any of bad_resume_opts from leaking in + # via EMERGE_DEFAULT_OPTS. + resume_opts["--ignore-default-opts"] = True + for myopt, myarg in resume_opts.iteritems(): if myopt not in bad_resume_opts: if myarg is True: mynewargv.append(myopt) -- 2.26.2