From: Alexander Berntsen <alexan...@plaimi.net> Signed-off-by: Alexander Berntsen <berna...@gentoo.org> --- Use 'is' instead of '==', as recommended by Zac.
man/emerge.1 | 3 ++- pym/_emerge/depgraph.py | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/man/emerge.1 b/man/emerge.1 index e32bb43..8bf3db1 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -367,7 +367,8 @@ to config files, respecting \fBCONFIG_PROTECT\fR and \fB\-\-ask\fR. If the corresponding package.* is a file, the changes are appended to it, if it is a directory, changes are written to the lexicographically last file. This way it is always ensured that the new changes take -precedence over existing changes. +precedence over existing changes. This option is automatically enabled with +\-\-ask. .TP .BR \-\-backtrack=COUNT Specifies an integer number of times to backtrack if diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 6332733..cc76320 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -7514,12 +7514,15 @@ class depgraph(object): (using CONFIG_PROTECT). The message includes the comments and the changes. """ - autounmask_write = self._frozen_config.myopts.get("--autounmask-write", "n") == True + ask = "--ask" in self._frozen_config.myopts + autounmask_write_y = \ + self._frozen_config.myopts.get("--autounmask-write", "y") + autounmask_write = not autounmask_write_y == "n" and \ + (ask or autounmask_write_y is True) autounmask_unrestricted_atoms = \ self._frozen_config.myopts.get("--autounmask-unrestricted-atoms", "n") == True quiet = "--quiet" in self._frozen_config.myopts pretend = "--pretend" in self._frozen_config.myopts - ask = "--ask" in self._frozen_config.myopts enter_invalid = '--ask-enter-invalid' in self._frozen_config.myopts def check_if_latest(pkg): -- 1.8.5.5