public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] Add emerge --autounmask-continue option (bug 582624)
@ 2016-07-01  7:37 Zac Medico
  2016-07-01 10:29 ` Alexander Berntsen
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Zac Medico @ 2016-07-01  7:37 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Zac Medico

This option will cause emerge to automatically apply autounmask changes
to configuration files, and continue to execute the specified command.
If the dependency calculation is not entirely successful, then emerge
will simply abort without modifying any configuration files.

This sort of behavior can be very useful in a continuous integration
setting, where the emerge invocation might be inside of a container that
is later discarded (so there is no threat of negative consequences).
It's also safe for general use, when combined with the --ask option.

X-Gentoo-Bug: 582624
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=582624
---
 man/emerge.1                            | 14 +++++++++++++-
 pym/_emerge/actions.py                  | 28 ++++++++++++++++++++++------
 pym/_emerge/depgraph.py                 | 28 ++++++++++++++++++++++++----
 pym/_emerge/main.py                     |  9 +++++++++
 pym/portage/tests/emerge/test_simple.py |  5 +++++
 5 files changed, 73 insertions(+), 11 deletions(-)

diff --git a/man/emerge.1 b/man/emerge.1
index bfa2f73..40be14f 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -1,4 +1,4 @@
-.TH "EMERGE" "1" "Feb 2016" "Portage VERSION" "Portage"
+.TH "EMERGE" "1" "Jul 2016" "Portage VERSION" "Portage"
 .SH "NAME"
 emerge \- Command\-line interface to the Portage system
 .SH "SYNOPSIS"
@@ -361,6 +361,18 @@ the specified configuration file(s), or enable the
 \fBEMERGE_DEFAULT_OPTS\fR variable may be used to
 disable this option by default in \fBmake.conf\fR(5).
 .TP
+.BR "\-\-autounmask\-continue [ y | n ]"
+Automatically apply autounmask changes to configuration
+files, and continue to execute the specified command. If
+the dependency calculation is not entirely successful, then
+emerge will simply abort without modifying any configuration
+files.
+\fBWARNING:\fR
+This option is intended to be used only with great caution,
+since it is possible for it to make nonsensical configuration
+changes which may lead to system breakage. Therefore, it is
+advisable to use \fB\-\-ask\fR together with this option.
+.TP
 .BR "\-\-autounmask\-only [ y | n ]"
 Instead of doing any package building, just unmask
 packages and generate package.use settings as necessary
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 2ca7902..ff22687 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -96,8 +96,22 @@ if sys.hexversion >= 0x3000000:
 else:
 	_unicode = unicode
 
-def action_build(settings, trees, mtimedb,
-	myopts, myaction, myfiles, spinner):
+def action_build(emerge_config, trees=DeprecationWarning,
+	mtimedb=DeprecationWarning, myopts=DeprecationWarning,
+	myaction=DeprecationWarning, myfiles=DeprecationWarning, spinner=None):
+
+	if not isinstance(emerge_config, _emerge_config):
+		warnings.warn("_emerge.actions.action_build() now expects "
+			"an _emerge_config instance as the first parameter",
+			DeprecationWarning, stacklevel=2)
+		emerge_config = load_emerge_config(
+			action=myaction, args=myfiles, trees=trees, opts=myopts)
+		adjust_configs(emerge_config.opts, emerge_config.trees)
+
+	settings, trees, mtimedb = emerge_config
+	myopts = emerge_config.opts
+	myaction = emerge_config.action
+	myfiles = emerge_config.args
 
 	if '--usepkgonly' not in myopts:
 		old_tree_timestamp_warn(settings['PORTDIR'], settings)
@@ -327,6 +341,11 @@ def action_build(settings, trees, mtimedb,
 			display_missing_pkg_set(root_config, e.value)
 			return 1
 
+		if success and mydepgraph.need_config_reload():
+			load_emerge_config(emerge_config=emerge_config)
+			adjust_configs(emerge_config.opts, emerge_config.trees)
+			settings, trees, mtimedb = emerge_config
+
 		if "--autounmask-only" in myopts:
 			mydepgraph.display_problems()
 			return 0
@@ -3230,10 +3249,7 @@ def run_action(emerge_config):
 				except OSError:
 					writemsg("Please install eselect to use this feature.\n",
 							noiselevel=-1)
-		retval = action_build(emerge_config.target_config.settings,
-			emerge_config.trees, emerge_config.target_config.mtimedb,
-			emerge_config.opts, emerge_config.action,
-			emerge_config.args, spinner)
+		retval = action_build(emerge_config, spinner=spinner)
 		post_emerge(emerge_config.action, emerge_config.opts,
 			emerge_config.args, emerge_config.target_config.root,
 			emerge_config.trees, emerge_config.target_config.mtimedb, retval)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index f78f08d..090d7c8 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -431,6 +431,7 @@ class _dynamic_depgraph_config(object):
 		self._slot_operator_replace_installed = backtrack_parameters.slot_operator_replace_installed
 		self._prune_rebuilds = backtrack_parameters.prune_rebuilds
 		self._need_restart = False
+		self._need_config_reload = False
 		# For conditions that always require user intervention, such as
 		# unsatisfied REQUIRED_USE (currently has no autounmask support).
 		self._skip_restart = False
@@ -438,6 +439,7 @@ class _dynamic_depgraph_config(object):
 
 		self._buildpkgonly_deps_unsatisfied = False
 		self._autounmask = depgraph._frozen_config.myopts.get('--autounmask') != 'n'
+		self._displayed_autounmask = False
 		self._success_without_autounmask = False
 		self._required_use_unsatisfied = False
 		self._traverse_ignored_deps = False
@@ -4158,6 +4160,13 @@ class depgraph(object):
 			self._dynamic_config._needed_license_changes) :
 			#We failed if the user needs to change the configuration
 			self._dynamic_config._success_without_autounmask = True
+			if (self._frozen_config.myopts.get("--autounmask-continue") is True and
+				"--pretend" not in self._frozen_config.myopts):
+				# This will return false if it fails or if the user
+				# aborts via --ask.
+				if self._display_autounmask(autounmask_continue=True):
+					self._dynamic_config._need_config_reload = True
+					return True, myfavorites
 			return False, myfavorites
 
 		# We're true here unless we are missing binaries.
@@ -7973,14 +7982,19 @@ class depgraph(object):
 
 		return display(self, mylist, favorites, verbosity)
 
-	def _display_autounmask(self):
+	def _display_autounmask(self, autounmask_continue=False):
 		"""
 		Display --autounmask message and optionally write it to config files
 		(using CONFIG_PROTECT). The message includes the comments and the changes.
 		"""
 
+		if self._dynamic_config._displayed_autounmask:
+			return
+
+		self._dynamic_config._displayed_autounmask = True
+
 		ask = "--ask" in self._frozen_config.myopts
-		autounmask_write = \
+		autounmask_write = autounmask_continue or \
 				self._frozen_config.myopts.get("--autounmask-write",
 								   ask) is True
 		autounmask_unrestricted_atoms = \
@@ -8265,7 +8279,7 @@ class depgraph(object):
 				writemsg(format_msg(license_msg[root]), noiselevel=-1)
 
 		protect_obj = {}
-		if write_to_file:
+		if write_to_file and not autounmask_continue:
 			for root in roots:
 				settings = self._frozen_config.roots[root].settings
 				protect_obj[root] = ConfigProtect(
@@ -8292,7 +8306,8 @@ class depgraph(object):
 						(file_to_write_to, e))
 			if file_contents is not None:
 				file_contents.extend(changes)
-				if protect_obj[root].isprotected(file_to_write_to):
+				if (not autounmask_continue and
+					protect_obj[root].isprotected(file_to_write_to)):
 					# We want to force new_protect_filename to ensure
 					# that the user will see all our changes via
 					# dispatch-conf, even if file_to_write_to doesn't
@@ -8351,6 +8366,8 @@ class depgraph(object):
 		elif write_to_file and roots:
 			writemsg("\nAutounmask changes successfully written.\n",
 				noiselevel=-1)
+			if autounmask_continue:
+				return True
 			for root in roots:
 				chk_updated_cfg_files(root,
 					[os.path.join(os.sep, USER_CONFIG_PATH)])
@@ -8872,6 +8889,9 @@ class depgraph(object):
 		return self._dynamic_config._success_without_autounmask or \
 			self._dynamic_config._required_use_unsatisfied
 
+	def need_config_reload(self):
+		return self._dynamic_config._need_config_reload
+
 	def autounmask_breakage_detected(self):
 		try:
 			for pargs, kwargs in self._dynamic_config._unsatisfied_deps_for_display:
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 5dbafee..0e672a2 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -127,6 +127,7 @@ def insert_optional_args(args):
 		'--alert'                : y_or_n,
 		'--ask'                  : y_or_n,
 		'--autounmask'           : y_or_n,
+		'--autounmask-continue'  : y_or_n,
 		'--autounmask-only'      : y_or_n,
 		'--autounmask-keep-masks': y_or_n,
 		'--autounmask-unrestricted-atoms' : y_or_n,
@@ -324,6 +325,11 @@ def parse_opts(tmpcmdline, silent=False):
 			"choices" : true_y_or_n
 		},
 
+		"--autounmask-continue": {
+			"help"    : "write autounmask changes and continue",
+			"choices" : true_y_or_n
+		},
+
 		"--autounmask-only": {
 			"help"    : "only perform --autounmask",
 			"choices" : true_y_or_n
@@ -751,6 +757,9 @@ def parse_opts(tmpcmdline, silent=False):
 	if myoptions.autounmask in true_y:
 		myoptions.autounmask = True
 
+	if myoptions.autounmask_continue in true_y:
+		myoptions.autounmask_continue = True
+
 	if myoptions.autounmask_only in true_y:
 		myoptions.autounmask_only = True
 	else:
diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index e5ecd4b..22f8aef 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -109,6 +109,10 @@ pkg_preinst() {
 				"LICENSE": "GPL-2",
 				"MISC_CONTENT": install_something,
 			},
+			"dev-libs/C-1": {
+				"EAPI" : "6",
+				"KEYWORDS": "~x86",
+			},
 			"virtual/foo-0": {
 				"EAPI" : "5",
 				"KEYWORDS": "x86",
@@ -300,6 +304,7 @@ pkg_preinst() {
 			emerge_cmd + ("-p", "--unmerge", "-q", eroot + "usr"),
 			emerge_cmd + ("--unmerge", "--quiet", "dev-libs/A"),
 			emerge_cmd + ("-C", "--quiet", "dev-libs/B"),
+			emerge_cmd + ("--autounmask-continue", "dev-libs/C",),
 
 			# Test cross-prefix usage, including chpathtool for binpkgs.
 			({"EPREFIX" : cross_prefix},) + \
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-01  7:37 [gentoo-portage-dev] [PATCH] Add emerge --autounmask-continue option (bug 582624) Zac Medico
@ 2016-07-01 10:29 ` Alexander Berntsen
  2016-07-01 12:45   ` Francesco Riosa
  2016-07-01 15:35   ` Zac Medico
  2016-07-01 22:46 ` Zac Medico
  2016-07-02  5:19 ` [gentoo-portage-dev] [PATCH v2] " Zac Medico
  2 siblings, 2 replies; 19+ messages in thread
From: Alexander Berntsen @ 2016-07-01 10:29 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

The patch itself looks OK, but I think that this option is a bad idea
and design, and that the extra complexity isn't warranted. I know
users have asked for something similar several times, but thankfully
the users aren't the developers.

But if you genuinely think this is a good idea, and someone else on
the team does too, I won't oppose it. We should make sure that we
strongly discourage its usage for regular users. Perhaps your
suggested manpage addition already does -- I don't know.
- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJXdkX1AAoJENQqWdRUGk8BYbUQAM6EcIv7/2PpOM/ETY6zlZM3
hHH6X4ZofiMJCaXN+xoppFhJ6+d9851VlMS98r7lTPe4BiMlcjXELkb9ukgHJG2S
PJtRRo79MlTIH3WB3q7Se+ZIkvtTjikVLKRQgxir5i6UxXgOZgp0ucYguvtnU2U5
79bAxXaUwbqt7o51FfR42J+xWjlfKl36cKsbkMCthNzTyGD/eX8L6wHjkphPhZ9I
hxMdmRKs9eKV6EOIDc5ZP55B3+NBeLo5VXZSylZurrwlkGyFhFFUUnIXRkX/Xod5
3Tgk980KrqDwuhZ1tT7Jug8x+uOHYrugZzL9AW/T91ACp9kut2gXYhXATufHXHT4
6vCm9BCNwqMQh3GkQCVQEhY1P3okFdR1SXZuzjiSpfbzkZjyIJ1o/Vj/X5/gq+SC
CWQBgIyoW9hVvIQqHbfnoEewfXhwFpvknl7R8DeWiCZbX462Gjn5dQ4KKZHlQrLk
nDtvHKmX6aXC7ElQsRMagZ5HevfcU2h4uYbYorkaipNskMFMeGBT5j85jK3Nu9C9
0XX6GD+djYDd0L4hk0h6Kb30PZu5p5Y9HIQdia0tspwUDsbSsOdJe/vNYQMNy50z
Oke0arfNJEY5KfILV5QS1ShkX/2Ot+tZtDsPsEZKMidK5hYZcyeAHQ0MmVLLikkj
CtWAcVXmHmOz3HH6tVTY
=buhT
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-01 10:29 ` Alexander Berntsen
@ 2016-07-01 12:45   ` Francesco Riosa
  2016-07-01 15:39     ` Zac Medico
  2016-07-01 15:35   ` Zac Medico
  1 sibling, 1 reply; 19+ messages in thread
From: Francesco Riosa @ 2016-07-01 12:45 UTC (permalink / raw
  To: gentoo-portage-dev

[-- Attachment #1: Type: text/plain, Size: 1964 bytes --]

Hi,
  thanks for your continuous work, just an implementation detail, it may be
possible to avoid a new option reusing the current autounmask one?

instead of
--autounmask [ y | n ]
--autounmask-only [ y | n ]
--autounmask-write [ y | n ]
--autounmask-continue [ y | n ]

something like:
--autounmask [ y | n | only | write | continue]

especially if these options make no sense used together


2016-07-01 12:29 GMT+02:00 Alexander Berntsen <bernalex@gentoo.org>:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> The patch itself looks OK, but I think that this option is a bad idea
> and design, and that the extra complexity isn't warranted. I know
> users have asked for something similar several times, but thankfully
> the users aren't the developers.
>
> But if you genuinely think this is a good idea, and someone else on
> the team does too, I won't oppose it. We should make sure that we
> strongly discourage its usage for regular users. Perhaps your
> suggested manpage addition already does -- I don't know.
> - --
> Alexander
> bernalex@gentoo.org
> https://secure.plaimi.net/~alexander
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQIcBAEBCgAGBQJXdkX1AAoJENQqWdRUGk8BYbUQAM6EcIv7/2PpOM/ETY6zlZM3
> hHH6X4ZofiMJCaXN+xoppFhJ6+d9851VlMS98r7lTPe4BiMlcjXELkb9ukgHJG2S
> PJtRRo79MlTIH3WB3q7Se+ZIkvtTjikVLKRQgxir5i6UxXgOZgp0ucYguvtnU2U5
> 79bAxXaUwbqt7o51FfR42J+xWjlfKl36cKsbkMCthNzTyGD/eX8L6wHjkphPhZ9I
> hxMdmRKs9eKV6EOIDc5ZP55B3+NBeLo5VXZSylZurrwlkGyFhFFUUnIXRkX/Xod5
> 3Tgk980KrqDwuhZ1tT7Jug8x+uOHYrugZzL9AW/T91ACp9kut2gXYhXATufHXHT4
> 6vCm9BCNwqMQh3GkQCVQEhY1P3okFdR1SXZuzjiSpfbzkZjyIJ1o/Vj/X5/gq+SC
> CWQBgIyoW9hVvIQqHbfnoEewfXhwFpvknl7R8DeWiCZbX462Gjn5dQ4KKZHlQrLk
> nDtvHKmX6aXC7ElQsRMagZ5HevfcU2h4uYbYorkaipNskMFMeGBT5j85jK3Nu9C9
> 0XX6GD+djYDd0L4hk0h6Kb30PZu5p5Y9HIQdia0tspwUDsbSsOdJe/vNYQMNy50z
> Oke0arfNJEY5KfILV5QS1ShkX/2Ot+tZtDsPsEZKMidK5hYZcyeAHQ0MmVLLikkj
> CtWAcVXmHmOz3HH6tVTY
> =buhT
> -----END PGP SIGNATURE-----
>
>

[-- Attachment #2: Type: text/html, Size: 2613 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-01 10:29 ` Alexander Berntsen
  2016-07-01 12:45   ` Francesco Riosa
@ 2016-07-01 15:35   ` Zac Medico
  2016-07-01 16:42     ` [gentoo-portage-dev] " Duncan
  1 sibling, 1 reply; 19+ messages in thread
From: Zac Medico @ 2016-07-01 15:35 UTC (permalink / raw
  To: gentoo-portage-dev

On 07/01/2016 03:29 AM, Alexander Berntsen wrote:
> The patch itself looks OK, but I think that this option is a bad idea
> and design, and that the extra complexity isn't warranted. I know
> users have asked for something similar several times, but thankfully
> the users aren't the developers.

It's an extremely useful option in certain contexts (especially
continuous integration). I have a wrapper script that does this, but
it's tricky to emulate this behavior with existing options, since
without it there's no way to know whether or not the dependency
calculation was completely successful (then you have to check if an
config changes were made, apply them, and waste time repeating the
dependency calculation all over again without knowing whether or not it
will succeed).

The patch is really much less complex than I had imagined before I
started writing it. I expect it to be quite maintainable.

> But if you genuinely think this is a good idea, and someone else on
> the team does too, I won't oppose it. We should make sure that we
> strongly discourage its usage for regular users. Perhaps your
> suggested manpage addition already does -- I don't know.

Yeah, I think the warning message that I've put in the man patch is
pretty good:

> This option is intended to be used only with great caution,
> since it is possible for it to make nonsensical configuration
> changes which may lead to system breakage. Therefore, it is
> advisable to use ---ask together with this option.
-- 
Thanks,
Zac


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-01 12:45   ` Francesco Riosa
@ 2016-07-01 15:39     ` Zac Medico
  0 siblings, 0 replies; 19+ messages in thread
From: Zac Medico @ 2016-07-01 15:39 UTC (permalink / raw
  To: gentoo-portage-dev

On 07/01/2016 05:45 AM, Francesco Riosa wrote:
> Hi,
>   thanks for your continuous work, just an implementation detail, it may
> be possible to avoid a new option reusing the current autounmask one?
> 
> instead of 
> --autounmask [ y | n ]
> --autounmask-only [ y | n ]
> --autounmask-write [ y | n ]
> --autounmask-continue [ y | n ]
> 
> something like:
> --autounmask [ y | n | only | write | continue]
> 
> especially if these options make no sense used together

That's an interesting idea, but my experience is that boolean options
lead to simpler code, so I would prefer to stick with booleans.
-- 
Thanks,
Zac


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-01 15:35   ` Zac Medico
@ 2016-07-01 16:42     ` Duncan
  2016-07-01 16:43       ` Alexander Berntsen
  2016-07-01 17:17       ` Zac Medico
  0 siblings, 2 replies; 19+ messages in thread
From: Duncan @ 2016-07-01 16:42 UTC (permalink / raw
  To: gentoo-portage-dev

Zac Medico posted on Fri, 01 Jul 2016 08:35:26 -0700 as excerpted:

>> But if you genuinely think this is a good idea, and someone else on the
>> team does too, I won't oppose it. We should make sure that we strongly
>> discourage its usage for regular users. Perhaps your suggested manpage
>> addition already does -- I don't know.
> 
> Yeah, I think the warning message that I've put in the man patch is
> pretty good:
> 
>> This option is intended to be used only with great caution,
>> since it is possible for it to make nonsensical configuration changes
>> which may lead to system breakage. Therefore, it is advisable to use
>> ---ask together with this option.

Perhaps rename the option so it makes perfectly clear the possible 
consequences?  Something like --autounmask-breakme, or --auto-breakme ?

Or alternatively, if there are other arguably dangerous options now or 
possible in the future, put them all under another option, --breakme, 
such that if that option isn't there, the otherwise dangerous options 
only print a warning and die.

Then people can read the manpage if they really want to know what it 
does, but people who haven't, aren't as likely to blunder into it due to 
the stereotypical "rm -rf .*" type advice.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-01 16:42     ` [gentoo-portage-dev] " Duncan
@ 2016-07-01 16:43       ` Alexander Berntsen
  2016-07-01 17:17       ` Zac Medico
  1 sibling, 0 replies; 19+ messages in thread
From: Alexander Berntsen @ 2016-07-01 16:43 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 01/07/16 18:42, Duncan wrote:
> Perhaps rename the option so it makes perfectly clear the possible
>  consequences?  Something like --autounmask-breakme, or
> --auto-breakme ?
No.

- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJXdp2pAAoJENQqWdRUGk8BBBYQAMGox5DztriYSWDvnFJQ4gWv
rAYmauL+hb4fvv7NTRjrPzqh4YBKj/pRsaNavAnfBQxqPSmYYZ34exR7vpW3Felb
/gKxKWG1tRwjqC9mZzMjY9Xv/0cD5lprJ4CPXEV32PuP1Y48FBr382aS0X0PIeKr
9cX81Rgt50eS7X7ccJ8GJq6TC8FowCVmOgILrDsKLDeSEVWA4whL0etsBv9ipLC4
4Qg0EfJ1ff9y3e3bMpQ/QbjBRzt6nNyJhw6KlxbhUE4X3wgLP4UUjc/vcRtM9k/o
nTbG1JPzLLV3vJcEGwWbdM746wZpntslgv15Rp+fsw71grPV5AVFcBsPpfsXbUdc
2t37JB0PZp2MgzTV8JGaF7C7WppE1MJ70ZioAAF7RdoGV0BhGLUt3f9uCwjd37nH
nIescYraZCOk96zEC7hDzVyBBL8Z8nVAnwHorKxDcoFzS02dlcnrIqBUhQrkr+rD
pg+oPgLzU++nTjYgd8dn4j+h7hRAWIOFUaMPTmwI6Zi4hqtij56GnJZRrO5kMq+8
zmSyixEAJjJQucvw+wns2YPbI/ek/LPez6GJHN2sk3APNPcWISXdYmV4UxdhK2t9
UDIM8OQxKcyjM9+vErr5BU9Dy+OuQtpjGwtkcanEXRwVDh+QCci4MwGuH2hDDpRZ
6YOj9c0nsVwQd3bSnEB5
=14Rr
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-01 16:42     ` [gentoo-portage-dev] " Duncan
  2016-07-01 16:43       ` Alexander Berntsen
@ 2016-07-01 17:17       ` Zac Medico
  2016-07-01 23:25         ` Brian Dolbec
  1 sibling, 1 reply; 19+ messages in thread
From: Zac Medico @ 2016-07-01 17:17 UTC (permalink / raw
  To: gentoo-portage-dev

On 07/01/2016 09:42 AM, Duncan wrote:
> Zac Medico posted on Fri, 01 Jul 2016 08:35:26 -0700 as excerpted:
> 
>>> But if you genuinely think this is a good idea, and someone else on the
>>> team does too, I won't oppose it. We should make sure that we strongly
>>> discourage its usage for regular users. Perhaps your suggested manpage
>>> addition already does -- I don't know.
>>
>> Yeah, I think the warning message that I've put in the man patch is
>> pretty good:
>>
>>> This option is intended to be used only with great caution,
>>> since it is possible for it to make nonsensical configuration changes
>>> which may lead to system breakage. Therefore, it is advisable to use
>>> ---ask together with this option.
> 
> Perhaps rename the option so it makes perfectly clear the possible 
> consequences?  Something like --autounmask-breakme, or --auto-breakme ?

My experience with my wrapper script that gives similar behavior is that
it practically always "just works". It's fabulous for continuous
integration (aka tinderbox) settings. However, as with self-driving
cars, it deserves caution.

> Or alternatively, if there are other arguably dangerous options now or 
> possible in the future, put them all under another option, --breakme, 
> such that if that option isn't there, the otherwise dangerous options 
> only print a warning and die.
> 
> Then people can read the manpage if they really want to know what it 
> does, but people who haven't, aren't as likely to blunder into it due to 
> the stereotypical "rm -rf .*" type advice.

It's simply not as risky as you're making it out to be. If it's a
production system, use --ask. Honestly, people who can't be exposed to
options like this should not have root access.
-- 
Thanks,
Zac


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-01  7:37 [gentoo-portage-dev] [PATCH] Add emerge --autounmask-continue option (bug 582624) Zac Medico
  2016-07-01 10:29 ` Alexander Berntsen
@ 2016-07-01 22:46 ` Zac Medico
  2016-07-02  5:40   ` Zac Medico
  2016-07-02  5:19 ` [gentoo-portage-dev] [PATCH v2] " Zac Medico
  2 siblings, 1 reply; 19+ messages in thread
From: Zac Medico @ 2016-07-01 22:46 UTC (permalink / raw
  To: gentoo-portage-dev

On 07/01/2016 12:37 AM, Zac Medico wrote:
> @@ -327,6 +341,11 @@ def action_build(settings, trees, mtimedb,
>  			display_missing_pkg_set(root_config, e.value)
>  			return 1
>  
> +		if success and mydepgraph.need_config_reload():
> +			load_emerge_config(emerge_config=emerge_config)
> +			adjust_configs(emerge_config.opts, emerge_config.trees)
> +			settings, trees, mtimedb = emerge_config
> +

The Package instances inside the depgraph are still going to reference
the old RootConfig instances, so I'll update the patch to solve that
somehow.
-- 
Thanks,
Zac


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-01 17:17       ` Zac Medico
@ 2016-07-01 23:25         ` Brian Dolbec
  0 siblings, 0 replies; 19+ messages in thread
From: Brian Dolbec @ 2016-07-01 23:25 UTC (permalink / raw
  To: gentoo-portage-dev

On Fri, 1 Jul 2016 10:17:50 -0700
Zac Medico <zmedico@gentoo.org> wrote:

> On 07/01/2016 09:42 AM, Duncan wrote:
> > Zac Medico posted on Fri, 01 Jul 2016 08:35:26 -0700 as excerpted:
> >   
> >>> But if you genuinely think this is a good idea, and someone else
> >>> on the team does too, I won't oppose it. We should make sure that
> >>> we strongly discourage its usage for regular users. Perhaps your
> >>> suggested manpage addition already does -- I don't know.  
> >>
> >> Yeah, I think the warning message that I've put in the man patch is
> >> pretty good:
> >>  
> >>> This option is intended to be used only with great caution,
> >>> since it is possible for it to make nonsensical configuration
> >>> changes which may lead to system breakage. Therefore, it is
> >>> advisable to use ---ask together with this option.  
> > 
> > Perhaps rename the option so it makes perfectly clear the possible 
> > consequences?  Something like --autounmask-breakme, or
> > --auto-breakme ?  
> 
> My experience with my wrapper script that gives similar behavior is
> that it practically always "just works". It's fabulous for continuous
> integration (aka tinderbox) settings. However, as with self-driving
> cars, it deserves caution.
> 
> > Or alternatively, if there are other arguably dangerous options now
> > or possible in the future, put them all under another option,
> > --breakme, such that if that option isn't there, the otherwise
> > dangerous options only print a warning and die.
> > 
> > Then people can read the manpage if they really want to know what
> > it does, but people who haven't, aren't as likely to blunder into
> > it due to the stereotypical "rm -rf .*" type advice.  
> 
> It's simply not as risky as you're making it out to be. If it's a
> production system, use --ask. Honestly, people who can't be exposed to
> options like this should not have root access.

yeah, the development work I've been doing for work has me making a
bunch of new ebuilds for pkgs not yet in the tree.

This feature would make it easier for sure.

I also like the idea of this feature.

I don't think there will be many users killing their system by
overusing it or adding it to EMERGE_DEFAULT_OPTS.

 
-- 
Brian Dolbec <dolsen>



^ permalink raw reply	[flat|nested] 19+ messages in thread

* [gentoo-portage-dev] [PATCH v2] Add emerge --autounmask-continue option (bug 582624)
  2016-07-01  7:37 [gentoo-portage-dev] [PATCH] Add emerge --autounmask-continue option (bug 582624) Zac Medico
  2016-07-01 10:29 ` Alexander Berntsen
  2016-07-01 22:46 ` Zac Medico
@ 2016-07-02  5:19 ` Zac Medico
  2 siblings, 0 replies; 19+ messages in thread
From: Zac Medico @ 2016-07-02  5:19 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Zac Medico

This option will cause emerge to automatically apply autounmask changes
to configuration files, and continue to execute the specified command.
If the dependency calculation is not entirely successful, then emerge
will simply abort without modifying any configuration files.

This sort of behavior can be very useful in a continuous integration
setting, where the emerge invocation might be inside of a container that
is later discarded (so there is no threat of negative consequences).
It's also safe for general use, when combined with the --ask option.

X-Gentoo-Bug: 582624
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=582624
---
[PATCH v2] changes:

* fix depgraph to update USE state of Package instances to be consistent
with config file changes

* fix load_emerge_config to update existing RootConfig instances
in-place, so that the update propagates globally (to depgraph and the
Package instances it contains)

* include a use configuration change in the unit test, and assert that
it is applied correctly

 man/emerge.1                            | 14 +++++++++++-
 pym/_emerge/actions.py                  | 36 +++++++++++++++++++++++------
 pym/_emerge/depgraph.py                 | 40 +++++++++++++++++++++++++++++----
 pym/_emerge/main.py                     |  9 ++++++++
 pym/portage/tests/emerge/test_simple.py | 15 +++++++++++++
 5 files changed, 102 insertions(+), 12 deletions(-)

diff --git a/man/emerge.1 b/man/emerge.1
index bfa2f73..40be14f 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -1,4 +1,4 @@
-.TH "EMERGE" "1" "Feb 2016" "Portage VERSION" "Portage"
+.TH "EMERGE" "1" "Jul 2016" "Portage VERSION" "Portage"
 .SH "NAME"
 emerge \- Command\-line interface to the Portage system
 .SH "SYNOPSIS"
@@ -361,6 +361,18 @@ the specified configuration file(s), or enable the
 \fBEMERGE_DEFAULT_OPTS\fR variable may be used to
 disable this option by default in \fBmake.conf\fR(5).
 .TP
+.BR "\-\-autounmask\-continue [ y | n ]"
+Automatically apply autounmask changes to configuration
+files, and continue to execute the specified command. If
+the dependency calculation is not entirely successful, then
+emerge will simply abort without modifying any configuration
+files.
+\fBWARNING:\fR
+This option is intended to be used only with great caution,
+since it is possible for it to make nonsensical configuration
+changes which may lead to system breakage. Therefore, it is
+advisable to use \fB\-\-ask\fR together with this option.
+.TP
 .BR "\-\-autounmask\-only [ y | n ]"
 Instead of doing any package building, just unmask
 packages and generate package.use settings as necessary
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 2ca7902..1dc2b0d 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -96,8 +96,22 @@ if sys.hexversion >= 0x3000000:
 else:
 	_unicode = unicode
 
-def action_build(settings, trees, mtimedb,
-	myopts, myaction, myfiles, spinner):
+def action_build(emerge_config, trees=DeprecationWarning,
+	mtimedb=DeprecationWarning, myopts=DeprecationWarning,
+	myaction=DeprecationWarning, myfiles=DeprecationWarning, spinner=None):
+
+	if not isinstance(emerge_config, _emerge_config):
+		warnings.warn("_emerge.actions.action_build() now expects "
+			"an _emerge_config instance as the first parameter",
+			DeprecationWarning, stacklevel=2)
+		emerge_config = load_emerge_config(
+			action=myaction, args=myfiles, trees=trees, opts=myopts)
+		adjust_configs(emerge_config.opts, emerge_config.trees)
+
+	settings, trees, mtimedb = emerge_config
+	myopts = emerge_config.opts
+	myaction = emerge_config.action
+	myfiles = emerge_config.args
 
 	if '--usepkgonly' not in myopts:
 		old_tree_timestamp_warn(settings['PORTDIR'], settings)
@@ -327,6 +341,11 @@ def action_build(settings, trees, mtimedb,
 			display_missing_pkg_set(root_config, e.value)
 			return 1
 
+		if success and mydepgraph.need_config_reload():
+			load_emerge_config(emerge_config=emerge_config)
+			adjust_configs(emerge_config.opts, emerge_config.trees)
+			settings, trees, mtimedb = emerge_config
+
 		if "--autounmask-only" in myopts:
 			mydepgraph.display_problems()
 			return 0
@@ -2384,7 +2403,13 @@ def load_emerge_config(emerge_config=None, **kargs):
 		settings = root_trees["vartree"].settings
 		settings._init_dirs()
 		setconfig = load_default_config(settings, root_trees)
-		root_trees["root_config"] = RootConfig(settings, root_trees, setconfig)
+		root_config = RootConfig(settings, root_trees, setconfig)
+		if "root_config" in root_trees:
+			# Propagate changes to the existing instance,
+			# which may be referenced by a depgraph.
+			root_trees["root_config"].update(root_config)
+		else:
+			root_trees["root_config"] = root_config
 
 	target_eroot = emerge_config.trees._target_eroot
 	emerge_config.target_config = \
@@ -3230,10 +3255,7 @@ def run_action(emerge_config):
 				except OSError:
 					writemsg("Please install eselect to use this feature.\n",
 							noiselevel=-1)
-		retval = action_build(emerge_config.target_config.settings,
-			emerge_config.trees, emerge_config.target_config.mtimedb,
-			emerge_config.opts, emerge_config.action,
-			emerge_config.args, spinner)
+		retval = action_build(emerge_config, spinner=spinner)
 		post_emerge(emerge_config.action, emerge_config.opts,
 			emerge_config.args, emerge_config.target_config.root,
 			emerge_config.trees, emerge_config.target_config.mtimedb, retval)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index f78f08d..005164e 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -431,6 +431,7 @@ class _dynamic_depgraph_config(object):
 		self._slot_operator_replace_installed = backtrack_parameters.slot_operator_replace_installed
 		self._prune_rebuilds = backtrack_parameters.prune_rebuilds
 		self._need_restart = False
+		self._need_config_reload = False
 		# For conditions that always require user intervention, such as
 		# unsatisfied REQUIRED_USE (currently has no autounmask support).
 		self._skip_restart = False
@@ -438,6 +439,7 @@ class _dynamic_depgraph_config(object):
 
 		self._buildpkgonly_deps_unsatisfied = False
 		self._autounmask = depgraph._frozen_config.myopts.get('--autounmask') != 'n'
+		self._displayed_autounmask = False
 		self._success_without_autounmask = False
 		self._required_use_unsatisfied = False
 		self._traverse_ignored_deps = False
@@ -4158,11 +4160,30 @@ class depgraph(object):
 			self._dynamic_config._needed_license_changes) :
 			#We failed if the user needs to change the configuration
 			self._dynamic_config._success_without_autounmask = True
+			if (self._frozen_config.myopts.get("--autounmask-continue") is True and
+				"--pretend" not in self._frozen_config.myopts):
+				# This will return false if it fails or if the user
+				# aborts via --ask.
+				if self._display_autounmask(autounmask_continue=True):
+					self._apply_autounmask_continue_state()
+					self._dynamic_config._need_config_reload = True
+					return True, myfavorites
 			return False, myfavorites
 
 		# We're true here unless we are missing binaries.
 		return (True, myfavorites)
 
+	def _apply_autounmask_continue_state(self):
+		"""
+		Apply autounmask changes to Package instances, so that their
+		state will be consistent configuration file changes.
+		"""
+		for node in self._dynamic_config._serialized_tasks_cache:
+			if isinstance(node, Package):
+				effective_use = self._pkg_use_enabled(node)
+				if effective_use != node.use.enabled:
+					node._metadata['USE'] = ' '.join(effective_use)
+
 	def _apply_parent_use_changes(self):
 		"""
 		For parents with unsatisfied conditional dependencies, translate
@@ -7973,14 +7994,19 @@ class depgraph(object):
 
 		return display(self, mylist, favorites, verbosity)
 
-	def _display_autounmask(self):
+	def _display_autounmask(self, autounmask_continue=False):
 		"""
 		Display --autounmask message and optionally write it to config files
 		(using CONFIG_PROTECT). The message includes the comments and the changes.
 		"""
 
+		if self._dynamic_config._displayed_autounmask:
+			return
+
+		self._dynamic_config._displayed_autounmask = True
+
 		ask = "--ask" in self._frozen_config.myopts
-		autounmask_write = \
+		autounmask_write = autounmask_continue or \
 				self._frozen_config.myopts.get("--autounmask-write",
 								   ask) is True
 		autounmask_unrestricted_atoms = \
@@ -8265,7 +8291,7 @@ class depgraph(object):
 				writemsg(format_msg(license_msg[root]), noiselevel=-1)
 
 		protect_obj = {}
-		if write_to_file:
+		if write_to_file and not autounmask_continue:
 			for root in roots:
 				settings = self._frozen_config.roots[root].settings
 				protect_obj[root] = ConfigProtect(
@@ -8292,7 +8318,8 @@ class depgraph(object):
 						(file_to_write_to, e))
 			if file_contents is not None:
 				file_contents.extend(changes)
-				if protect_obj[root].isprotected(file_to_write_to):
+				if (not autounmask_continue and
+					protect_obj[root].isprotected(file_to_write_to)):
 					# We want to force new_protect_filename to ensure
 					# that the user will see all our changes via
 					# dispatch-conf, even if file_to_write_to doesn't
@@ -8351,6 +8378,8 @@ class depgraph(object):
 		elif write_to_file and roots:
 			writemsg("\nAutounmask changes successfully written.\n",
 				noiselevel=-1)
+			if autounmask_continue:
+				return True
 			for root in roots:
 				chk_updated_cfg_files(root,
 					[os.path.join(os.sep, USER_CONFIG_PATH)])
@@ -8872,6 +8901,9 @@ class depgraph(object):
 		return self._dynamic_config._success_without_autounmask or \
 			self._dynamic_config._required_use_unsatisfied
 
+	def need_config_reload(self):
+		return self._dynamic_config._need_config_reload
+
 	def autounmask_breakage_detected(self):
 		try:
 			for pargs, kwargs in self._dynamic_config._unsatisfied_deps_for_display:
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 5dbafee..0e672a2 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -127,6 +127,7 @@ def insert_optional_args(args):
 		'--alert'                : y_or_n,
 		'--ask'                  : y_or_n,
 		'--autounmask'           : y_or_n,
+		'--autounmask-continue'  : y_or_n,
 		'--autounmask-only'      : y_or_n,
 		'--autounmask-keep-masks': y_or_n,
 		'--autounmask-unrestricted-atoms' : y_or_n,
@@ -324,6 +325,11 @@ def parse_opts(tmpcmdline, silent=False):
 			"choices" : true_y_or_n
 		},
 
+		"--autounmask-continue": {
+			"help"    : "write autounmask changes and continue",
+			"choices" : true_y_or_n
+		},
+
 		"--autounmask-only": {
 			"help"    : "only perform --autounmask",
 			"choices" : true_y_or_n
@@ -751,6 +757,9 @@ def parse_opts(tmpcmdline, silent=False):
 	if myoptions.autounmask in true_y:
 		myoptions.autounmask = True
 
+	if myoptions.autounmask_continue in true_y:
+		myoptions.autounmask_continue = True
+
 	if myoptions.autounmask_only in true_y:
 		myoptions.autounmask_only = True
 	else:
diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index e5ecd4b..b1a2af5 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -109,6 +109,16 @@ pkg_preinst() {
 				"LICENSE": "GPL-2",
 				"MISC_CONTENT": install_something,
 			},
+			"dev-libs/C-1": {
+				"EAPI" : "6",
+				"KEYWORDS": "~x86",
+				"RDEPEND": "dev-libs/D[flag]",
+			},
+			"dev-libs/D-1": {
+				"EAPI" : "6",
+				"KEYWORDS": "~x86",
+				"IUSE" : "flag",
+			},
 			"virtual/foo-0": {
 				"EAPI" : "5",
 				"KEYWORDS": "x86",
@@ -301,6 +311,11 @@ pkg_preinst() {
 			emerge_cmd + ("--unmerge", "--quiet", "dev-libs/A"),
 			emerge_cmd + ("-C", "--quiet", "dev-libs/B"),
 
+			emerge_cmd + ("--autounmask-continue", "dev-libs/C",),
+			# Verify that the above --autounmask-continue command caused
+			# USE=flag to be applied correctly to dev-libs/D.
+			portageq_cmd + ("match", eroot, "dev-libs/D[flag]"),
+
 			# Test cross-prefix usage, including chpathtool for binpkgs.
 			({"EPREFIX" : cross_prefix},) + \
 				emerge_cmd + ("--usepkgonly", "dev-libs/A"),
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-01 22:46 ` Zac Medico
@ 2016-07-02  5:40   ` Zac Medico
  2016-07-02 19:31     ` Brian Dolbec
  0 siblings, 1 reply; 19+ messages in thread
From: Zac Medico @ 2016-07-02  5:40 UTC (permalink / raw
  To: gentoo-portage-dev

On 07/01/2016 03:46 PM, Zac Medico wrote:
> On 07/01/2016 12:37 AM, Zac Medico wrote:
>> @@ -327,6 +341,11 @@ def action_build(settings, trees, mtimedb,
>>  			display_missing_pkg_set(root_config, e.value)
>>  			return 1
>>  
>> +		if success and mydepgraph.need_config_reload():
>> +			load_emerge_config(emerge_config=emerge_config)
>> +			adjust_configs(emerge_config.opts, emerge_config.trees)
>> +			settings, trees, mtimedb = emerge_config
>> +
> 
> The Package instances inside the depgraph are still going to reference
> the old RootConfig instances, so I'll update the patch to solve that
> somehow.

Fixed in v2 by making load_emerge_config update existing RootConfig
instances in-place.
-- 
Thanks,
Zac


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-02  5:40   ` Zac Medico
@ 2016-07-02 19:31     ` Brian Dolbec
  2016-07-04 12:16       ` Alexander Berntsen
                         ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Brian Dolbec @ 2016-07-02 19:31 UTC (permalink / raw
  To: gentoo-portage-dev

On Fri, 1 Jul 2016 22:40:47 -0700
Zac Medico <zmedico@gentoo.org> wrote:

> On 07/01/2016 03:46 PM, Zac Medico wrote:
> > On 07/01/2016 12:37 AM, Zac Medico wrote:  
> >> @@ -327,6 +341,11 @@ def action_build(settings, trees, mtimedb,
> >>  			display_missing_pkg_set(root_config,
> >> e.value) return 1
> >>  
> >> +		if success and mydepgraph.need_config_reload():
> >> +
> >> load_emerge_config(emerge_config=emerge_config)
> >> +			adjust_configs(emerge_config.opts,
> >> emerge_config.trees)
> >> +			settings, trees, mtimedb = emerge_config
> >> +  
> > 
> > The Package instances inside the depgraph are still going to
> > reference the old RootConfig instances, so I'll update the patch to
> > solve that somehow.  
> 
> Fixed in v2 by making load_emerge_config update existing RootConfig
> instances in-place.

looks fine to me
-- 
Brian Dolbec <dolsen>



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-02 19:31     ` Brian Dolbec
@ 2016-07-04 12:16       ` Alexander Berntsen
  2016-07-04 17:56         ` Zac Medico
  2016-07-04 12:17       ` Alexander Berntsen
  2016-07-04 18:02       ` Zac Medico
  2 siblings, 1 reply; 19+ messages in thread
From: Alexander Berntsen @ 2016-07-04 12:16 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Looks OK. But you've found a few bugs already. Maybe you'll find more.
I'd appreciate if you hold off until the end of the week before
pushing it confidently.
- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJXelOEAAoJENQqWdRUGk8BaZkP+gLy+ED4yZesGFZma0p8zpLA
X/xbqCiA3EVeAMa+0wS1KfwKFJuj9DpvUDkz3tx/G+Vgw6PMEkIUpGxkO2wL2o1R
B4RlSmlRy0XNcJA03Iig01arnsSmcdl4enr8A7ltSEM2RbrI+gLifIoRxBUDxsoW
+Zp0ovSm6DrSsC4KZO7reZ5GFmNqi63xQqFHru2FsLxipCpD/BN0QKCnldDKi/A8
vNNtKRw9s77K0atCeqAxJYG+WTn4hpV8Ro2BTXjqwzCrllPksfY5ouKjAP0wMLV7
doQ3z2kc25ZgYRsLh/MJVledH6QtbxHFs4hqaW+EloGR5nQYK6sXi30bfU5AaW8V
3pPh4H1MD8AJ9rl13azf79D4GmOpNyn1eV7GNAfe1W24YrhwHvbwEmCjRhkb1Yzh
VV4HL6EgqkhjXHBY0A+HqLvjmvnFyjDmRiEX4O8JmFWpuENq0KGwzTQHAZkyF/MB
LvOAcr2txVtPy2ZK25lwcz9CK6nlFtmERNhPIkrTpDTKxsxc787embvvTPjdMkve
wNuUQhHYVtWixLLef0xaGMArq/aLcDWVfsTzxLxqfFwa0xReaP5UNO7Uabgf43oe
BvVewtN0oByOipAQ5Eo78p5ueB7CQqJhakudqwM3DC4GWHMweo9aPGsnmgk8reog
zz7RZFeNjPEFNxDGZ06G
=Kl8X
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-02 19:31     ` Brian Dolbec
  2016-07-04 12:16       ` Alexander Berntsen
@ 2016-07-04 12:17       ` Alexander Berntsen
  2016-07-04 18:00         ` Zac Medico
  2016-07-04 18:02       ` Zac Medico
  2 siblings, 1 reply; 19+ messages in thread
From: Alexander Berntsen @ 2016-07-04 12:17 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Never mind. I see that it's already pushed. I guess this is where I
continue to argue my case for "Pushed as [commit hash]" emails.
- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJXelPSAAoJENQqWdRUGk8BMicP/i0u9q8dPi/lQAY5Y2JR5/xr
ZUNCXLhZTv8SQE/fSkkf7Cm/kgrRiLa2N0wUVSF0+npPHYfq/1Y4P5jjn/5sbgLM
AzsWfAbQjcIALt+GGnpfPlgGlOLKxX/HkCK+YN74mFsWFiTPZh6PK8tFTfNE0CMk
cRHnws1IPm5qto5opknXWQ/DkLKpuX4OtuRYXz2ZJ0gAkTJ9sNq9TvNMUpwwBozg
NdcNnHDNkYRnXdPiyAbBgO7a9QH5qvW5h7USXjPmfiVfiT97DVZYXMEQqWAw2ULf
iDYk/KhASCxPkZueFziJNaYb/YBIjuz8+jXwUUdoXylbqZ4mtvn2dr5UAzVqyXi7
YMU1CQABqvCeBy91qSSQucPK65OfX3RZXbOKa1rb6IqvxdYyGAEIJqGD+L09gfzS
PtBe/i+Dak1Je4J2QrI2G3Lm/TRF9yt065KebCOmAKcjqK/N6EFDpQ3elEZTDbRn
BODJ60OPi8IBLW+O8PcFjkU9YMSYYylKvVxToN1Q4r84trksDBj/GmMnurUozoyY
AOucJA7/ZYUeGHk4c9bCQIGmnE3ffvX+YRqOjZe309vMrF3RM3Emqn7cgWGDXp1l
mjR/HxQlIGuEkS3cXRf4vmmCOTRGJiI2jClIv4DAztbKU4E6FaAG/ymaqY0VXeJA
MgWG20fkVYt7XScYpPKL
=RKtx
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-04 12:16       ` Alexander Berntsen
@ 2016-07-04 17:56         ` Zac Medico
  0 siblings, 0 replies; 19+ messages in thread
From: Zac Medico @ 2016-07-04 17:56 UTC (permalink / raw
  To: gentoo-portage-dev

On 07/04/2016 05:16 AM, Alexander Berntsen wrote:
> Looks OK. But you've found a few bugs already. Maybe you'll find more.
> I'd appreciate if you hold off until the end of the week before
> pushing it confidently.

I'm extremely confident in v2 of the patch. I don't expect that we'll
find any bugs in it, and even if we do find bugs, I think it's even less
likely that those bugs would affect anyone who's not using
--autounmask-continue.
-- 
Thanks,
Zac


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-04 12:17       ` Alexander Berntsen
@ 2016-07-04 18:00         ` Zac Medico
  2016-07-04 18:23           ` Alexander Berntsen
  0 siblings, 1 reply; 19+ messages in thread
From: Zac Medico @ 2016-07-04 18:00 UTC (permalink / raw
  To: gentoo-portage-dev

On 07/04/2016 05:17 AM, Alexander Berntsen wrote:
> Never mind. I see that it's already pushed. I guess this is where I
> continue to argue my case for "Pushed as [commit hash]" emails.

I wasn't aware that there was an argument about that. I'll be happy to
send pushed emails.
-- 
Thanks,
Zac


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-02 19:31     ` Brian Dolbec
  2016-07-04 12:16       ` Alexander Berntsen
  2016-07-04 12:17       ` Alexander Berntsen
@ 2016-07-04 18:02       ` Zac Medico
  2 siblings, 0 replies; 19+ messages in thread
From: Zac Medico @ 2016-07-04 18:02 UTC (permalink / raw
  To: gentoo-portage-dev

On 07/02/2016 12:31 PM, Brian Dolbec wrote:
> On Fri, 1 Jul 2016 22:40:47 -0700
> Zac Medico <zmedico@gentoo.org> wrote:
> 
>> On 07/01/2016 03:46 PM, Zac Medico wrote:
>>> On 07/01/2016 12:37 AM, Zac Medico wrote:  
>>>> @@ -327,6 +341,11 @@ def action_build(settings, trees, mtimedb,
>>>>  			display_missing_pkg_set(root_config,
>>>> e.value) return 1
>>>>  
>>>> +		if success and mydepgraph.need_config_reload():
>>>> +
>>>> load_emerge_config(emerge_config=emerge_config)
>>>> +			adjust_configs(emerge_config.opts,
>>>> emerge_config.trees)
>>>> +			settings, trees, mtimedb = emerge_config
>>>> +  
>>>
>>> The Package instances inside the depgraph are still going to
>>> reference the old RootConfig instances, so I'll update the patch to
>>> solve that somehow.  
>>
>> Fixed in v2 by making load_emerge_config update existing RootConfig
>> instances in-place.
> 
> looks fine to me

Thanks, pushed:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=e2d88ef3ff5958571ef2da5f69e8756522390f0f
-- 
Thanks,
Zac


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [gentoo-portage-dev] Re: [PATCH] Add emerge --autounmask-continue option (bug 582624)
  2016-07-04 18:00         ` Zac Medico
@ 2016-07-04 18:23           ` Alexander Berntsen
  0 siblings, 0 replies; 19+ messages in thread
From: Alexander Berntsen @ 2016-07-04 18:23 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 04/07/16 20:00, Zac Medico wrote:
> I wasn't aware that there was an argument about that.
I didn't argue it very heavily, but I do find it useful.

> I'll be happy to send pushed emails.
Thanks!

- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJXeqmjAAoJENQqWdRUGk8BIgcQAKAB/lfkDzV8CHGi1ON9eHMI
kcLyTwryvX7Px/WM3Hz/lHcyVqQY10KxbRKxHW9yc1D1InyaVKeBilnL55eCdzUv
BkXwWrXeQCu390FXy4ph7nrQYm15fEqhW/kAD0BWYY2Bryks9UEPXFnNK/Aq0OTl
JVLGiWvc3ys9m1KJQ9PYdC+KgpXHMPl9bW0ui55063JmOTJZVjys713cCuRMCjiv
TLBk8fL266C1XZxkyomiYXVozE0y2ON9mDvqHpd2vUVuk64t4Ej3SwWvruX46rrw
XJZBu2HyUYYsaCnfl2xf97B1vai/r9XWae7kuzOZmrDvZzg0kVMxgwiXZtSAEXM7
ETlTRMjXZZl6e/gZ145rl8a8GSe/ElvLJGZOk+RdB9R8DzBmbGRyT53XQHZgkSgt
IvP+g4fYkutovyKQW8rVBiC4FCol3glugYHf6213e6ltWFRsIp+D9aWiynjG7gmD
esFTggYQexoTACpRgEjDBfbLkqd+Uv9CqGpYDvzX5zz626oxZ+ml9n8TtUTiHH5y
4XKWBWJykZZnLpfLPB9aofVU9u+0mA/S6028SfvuOpVjHi3bXRAl9i9W2AMoQsDU
1OcUJAfiVYOQRbLNg9iVoIVyjpz51Dr5rUb9UNP+Cci8OiJ4Dnu3/sEEgVIv9F+n
2soIC8Gapk3mqx5Wq5v2
=woLN
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-07-04 18:23 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-01  7:37 [gentoo-portage-dev] [PATCH] Add emerge --autounmask-continue option (bug 582624) Zac Medico
2016-07-01 10:29 ` Alexander Berntsen
2016-07-01 12:45   ` Francesco Riosa
2016-07-01 15:39     ` Zac Medico
2016-07-01 15:35   ` Zac Medico
2016-07-01 16:42     ` [gentoo-portage-dev] " Duncan
2016-07-01 16:43       ` Alexander Berntsen
2016-07-01 17:17       ` Zac Medico
2016-07-01 23:25         ` Brian Dolbec
2016-07-01 22:46 ` Zac Medico
2016-07-02  5:40   ` Zac Medico
2016-07-02 19:31     ` Brian Dolbec
2016-07-04 12:16       ` Alexander Berntsen
2016-07-04 17:56         ` Zac Medico
2016-07-04 12:17       ` Alexander Berntsen
2016-07-04 18:00         ` Zac Medico
2016-07-04 18:23           ` Alexander Berntsen
2016-07-04 18:02       ` Zac Medico
2016-07-02  5:19 ` [gentoo-portage-dev] [PATCH v2] " Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox