On 09/19/2014 12:56 AM, Alexander Berntsen wrote: > --- 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): >
Maybe this version is a little more readable: diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index f4e5a1b..ac3ceb8 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -7516,12 +7516,13 @@ 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 = \ + self._frozen_config.myopts.get("--autounmask-write", ask) 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): -- Thanks, Zac