diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-03-02 20:06:20 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-03-02 20:06:20 +0000 |
commit | 3655045c04a3a0e81126e0a41dd5f1752f43589c (patch) | |
tree | fcd11fd327e82993218ac8f22edc308dd464d5fc | |
parent | 64e6fa9fb79b6218e0b55bf0e6797c129a498723 (diff) | |
download | portage-3655045c04a3a0e81126e0a41dd5f1752f43589c.tar.gz portage-3655045c04a3a0e81126e0a41dd5f1752f43589c.tar.bz2 portage-3655045c04a3a0e81126e0a41dd5f1752f43589c.zip |
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 <welp@gentoo.org> for reporting.
svn path=/main/trunk/; revision=6133
-rw-r--r-- | pym/emerge/__init__.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 33d3a330d..bad745d45 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -2926,7 +2926,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) @@ -2935,6 +2940,8 @@ class MergeTask(object): portage.process.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: @@ -3183,7 +3190,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) |