public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r15372 - in main/trunk: man pym/_emerge
@ 2010-02-18 21:50 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2010-02-18 21:50 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2010-02-18 21:50:53 +0000 (Thu, 18 Feb 2010)
New Revision: 15372

Modified:
   main/trunk/man/emerge.1
   main/trunk/pym/_emerge/create_depgraph_params.py
   main/trunk/pym/_emerge/depgraph.py
   main/trunk/pym/_emerge/help.py
   main/trunk/pym/_emerge/main.py
Log:
Only enable --rebuilt-binaries automatically if --update and --deep are also
enabled.


Modified: main/trunk/man/emerge.1
===================================================================
--- main/trunk/man/emerge.1	2010-02-18 16:27:49 UTC (rev 15371)
+++ main/trunk/man/emerge.1	2010-02-18 21:50:53 UTC (rev 15372)
@@ -481,8 +481,9 @@
 Replace installed packages with binary packages that have
 been rebuilt. Rebuilds are detected by comparison of
 BUILD_TIME package metadata. This option is enabled
-automatically when using binary packages (see
-\fB\-\-usepkg\fR and \fB\-\-getbinpkg\fR).
+automatically when using binary packages
+(\fB\-\-usepkg\fR or \fB\-\-getbinpkg\fR) together with
+\fB\-\-update\fR and \fB\-\-deep\fR.
 .TP
 .BR "\-\-reinstall changed\-use"
 Tells emerge to include installed packages where USE flags have

Modified: main/trunk/pym/_emerge/create_depgraph_params.py
===================================================================
--- main/trunk/pym/_emerge/create_depgraph_params.py	2010-02-18 16:27:49 UTC (rev 15371)
+++ main/trunk/pym/_emerge/create_depgraph_params.py	2010-02-18 21:50:53 UTC (rev 15372)
@@ -15,6 +15,7 @@
 	# empty:     pretend nothing is merged
 	# complete:  completely account for all known dependencies
 	# remove:    build graph for use in removing packages
+	# rebuilt_binaries: replace installed packages with rebuilt binaries
 	myparams = {"recurse" : True}
 
 	if myaction == "remove":
@@ -37,6 +38,15 @@
 		myparams["deep"] = myopts["--deep"]
 	if "--complete-graph" in myopts:
 		myparams["complete"] = True
+
+	rebuilt_binaries = myopts.get('--rebuilt-binaries')
+	if rebuilt_binaries is True or \
+		rebuilt_binaries != 'n' and \
+		'--usepkg' in myopts and \
+		myopts.get('--deep') is True and \
+		'--update' in myopts:
+		myparams['rebuilt_binaries'] = True
+
 	if myopts.get("--selective") == "n":
 		# --selective=n can be used to remove selective
 		# behavior that may have been implied by some

Modified: main/trunk/pym/_emerge/depgraph.py
===================================================================
--- main/trunk/pym/_emerge/depgraph.py	2010-02-18 16:27:49 UTC (rev 15371)
+++ main/trunk/pym/_emerge/depgraph.py	2010-02-18 21:50:53 UTC (rev 15372)
@@ -2396,9 +2396,7 @@
 		atom_set = InternalPackageSet(initial_atoms=(atom,))
 		existing_node = None
 		myeb = None
-		usepkg = "--usepkg" in self._frozen_config.myopts
-		rebuilt_binaries = usepkg and \
-			self._frozen_config.myopts.get('--rebuilt-binaries') != 'n'
+		rebuilt_binaries = 'rebuilt_binaries' in self._dynamic_config.myparams
 		usepkgonly = "--usepkgonly" in self._frozen_config.myopts
 		empty = "empty" in self._dynamic_config.myparams
 		selective = "selective" in self._dynamic_config.myparams

Modified: main/trunk/pym/_emerge/help.py
===================================================================
--- main/trunk/pym/_emerge/help.py	2010-02-18 16:27:49 UTC (rev 15371)
+++ main/trunk/pym/_emerge/help.py	2010-02-18 21:50:53 UTC (rev 15372)
@@ -510,8 +510,9 @@
 		desc = "Replace installed packages with binary packages that have " + \
 			"been rebuilt. Rebuilds are detected by comparison of " + \
 			"BUILD_TIME package metadata. This option is enabled " + \
-			"automatically when using binary packages (see " + \
-			"--usepkg and --getbinpkg)."
+			"automatically when using binary packages " + \
+			"(--usepkg or --getbinpkg) together with " + \
+			"--update and --deep."
 		for line in wrap(desc, desc_width):
 			print(desc_indent + line)
 		print()

Modified: main/trunk/pym/_emerge/main.py
===================================================================
--- main/trunk/pym/_emerge/main.py	2010-02-18 16:27:49 UTC (rev 15371)
+++ main/trunk/pym/_emerge/main.py	2010-02-18 21:50:53 UTC (rev 15372)
@@ -741,8 +741,7 @@
 		myoptions.keep_going = None
 
 	if myoptions.rebuilt_binaries in ("True",):
-		# The depgraph will enable this by default unless 'n' is specified.
-		myoptions.rebuilt_binaries = None
+		myoptions.rebuilt_binaries = True
 
 	if myoptions.root_deps == "True":
 		myoptions.root_deps = True




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-18 21:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-18 21:50 [gentoo-commits] portage r15372 - in main/trunk: man pym/_emerge Zac Medico (zmedico)

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