public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alexander Berntsen <bernalex@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: Alexander Berntsen <alexander@plaimi.net>
Subject: [gentoo-portage-dev] [PATCH 4/4] emerge: Let --autounmask=n override other options
Date: Tue, 12 Aug 2014 11:37:15 +0200	[thread overview]
Message-ID: <1407836235-13528-5-git-send-email-bernalex@gentoo.org> (raw)
In-Reply-To: <1407836235-13528-1-git-send-email-bernalex@gentoo.org>

From: Alexander Berntsen <alexander@plaimi.net>

Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
---
 pym/_emerge/depgraph.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index bfa63fa..37b3a54 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -418,7 +418,8 @@ class _dynamic_depgraph_config(object):
 		self._backtrack_infos = {}
 
 		self._buildpkgonly_deps_unsatisfied = False
-		self._autounmask = True
+		self._autounmask = \
+				depgraph._frozen_config.myopts.get("--autounmask") != 'n'
 		self._success_without_autounmask = False
 		self._traverse_ignored_deps = False
 		self._complete_mode = False
@@ -7333,8 +7334,11 @@ class depgraph(object):
 		"""
 
 		ask = "--ask" in self._frozen_config.myopts
-		autounmask_write = ask or \
-				self._frozen_config.myopts.get("--autounmask", "n") == True
+		autounmask = self._frozen_config.myopts.get("--autounmask", "y")
+		# Write if *either* --autounmask is explicitly *true*, *or* if
+		# ask is *true* and --autounmask is *not* explicitly *false*
+		autounmask_write = autounmask is True or \
+				(autounmask != 'n'and ask != False)
 		autounmask_unrestricted_atoms = \
 			self._frozen_config.myopts.get("--autounmask-unrestricted-atoms", "n") == True
 		quiet = "--quiet" in self._frozen_config.myopts
-- 
1.8.5.5



  parent reply	other threads:[~2014-08-12  9:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-12  9:37 [gentoo-portage-dev] [PATCH 0/4] Autounmask changes Alexander Berntsen
2014-08-12  9:37 ` [gentoo-portage-dev] [PATCH 1/4] emerge: Deprecate --autounmask Alexander Berntsen
2014-08-12  9:37 ` [gentoo-portage-dev] [PATCH 2/4] emerge: Rename --autounmask-write to --autounmask Alexander Berntsen
2014-08-12  9:37 ` [gentoo-portage-dev] [PATCH 3/4] emerge: Make --autounmask=y if --ask=y Alexander Berntsen
2014-08-12  9:37 ` Alexander Berntsen [this message]
2014-08-13 16:06 ` [gentoo-portage-dev] [PATCH 0/4] Autounmask changes Alexander Berntsen
2014-08-13 16:45   ` Brian Dolbec
2014-08-13 16:56     ` Alexander Berntsen
2014-08-13 17:59       ` [gentoo-portage-dev] " Duncan
2014-08-13 18:39         ` Alexander Berntsen
2014-08-13 19:24         ` Wyatt Epp
2014-08-13 19:39           ` Alexander Berntsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1407836235-13528-5-git-send-email-bernalex@gentoo.org \
    --to=bernalex@gentoo.org \
    --cc=alexander@plaimi.net \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox