From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qj5ok-0000T3-Ko for garchives@archives.gentoo.org; Tue, 19 Jul 2011 08:38:14 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F3F8221C0C0; Tue, 19 Jul 2011 08:38:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id ADF3321C0C0 for ; Tue, 19 Jul 2011 08:38:05 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 234CF1B400C for ; Tue, 19 Jul 2011 08:38:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 78B098003D for ; Tue, 19 Jul 2011 08:38:04 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <72f83d8078da7aab7be9236b86be1526c15a4185.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: man/, pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: man/emerge.1 pym/_emerge/actions.py pym/_emerge/depgraph.py pym/_emerge/help.py pym/_emerge/main.py X-VCS-Directories: man/ pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 72f83d8078da7aab7be9236b86be1526c15a4185 Date: Tue, 19 Jul 2011 08:38:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: f4e5283849cffaef6f58ef9776d6d21a commit: 72f83d8078da7aab7be9236b86be1526c15a4185 Author: Zac Medico gentoo org> AuthorDate: Tue Jul 19 08:36:58 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Jul 19 08:36:58 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D72f83d80 Make emerge --noreplace identical to --selective. This removes a very subtle difference in --noreplace package selection logic which is not very useful and triggers strange package selection choices in some cases, as reported in bug #375571. --- man/emerge.1 | 8 ++------ pym/_emerge/actions.py | 8 ++++---- pym/_emerge/depgraph.py | 11 ----------- pym/_emerge/help.py | 9 +-------- pym/_emerge/main.py | 3 +-- 5 files changed, 8 insertions(+), 31 deletions(-) diff --git a/man/emerge.1 b/man/emerge.1 index df576ee..4a19bdb 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -488,10 +488,7 @@ Skips the packages specified on the command\-line th= at have already been installed. Without this option, any packages, ebuilds, or deps you specify on the command\-line \fBwill\fR cause Portage to remerge the package, even if it is already installed. Note that Portage will -not remerge dependencies by default. Also note that this option takes -precedence over options such as \fB\-\-newuse\fR, preventing a package -from being reinstalled even though the corresponding USE flag settings -may have changed. +not remerge dependencies by default. .TP .BR "\-\-nospinner" Disables the spinner for the session. The spinner is active when the @@ -619,8 +616,7 @@ use \fBEMERGE_DEFAULT_OPTS\fR to make \fB\-\-oneshot\fR behavior default. .TP .BR "\-\-selective [ y | n ]" -This is similar to the \fB\-\-noreplace\fR option, except that it -does not take precedence over options such as \fB\-\-newuse\fR. +This is identical to the \fB\-\-noreplace\fR option. Some options, such as \fB\-\-update\fR, imply \fB\-\-selective\fR. Use \fB\-\-selective=3Dn\fR if you want to forcefully disable \fB\-\-selective\fR, regardless of options like \fB\-\-update\fR. diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index f6c2721..219ed71 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -163,6 +163,8 @@ def action_build(settings, trees, mtimedb, debug =3D "--debug" in myopts verbose =3D "--verbose" in myopts quiet =3D "--quiet" in myopts + myparams =3D create_depgraph_params(myopts, myaction) + if pretend or fetchonly: # make the mtimedb readonly mtimedb.filename =3D None @@ -187,7 +189,6 @@ def action_build(settings, trees, mtimedb, favorites =3D mtimedb["resume"].get("favorites") if not isinstance(favorites, list): favorites =3D [] - myparams =3D create_depgraph_params(myopts, myaction) =20 resume_data =3D mtimedb["resume"] mergelist =3D resume_data["mergelist"] @@ -286,7 +287,6 @@ def action_build(settings, trees, mtimedb, print(darkgreen("emerge: It seems we have nothing to resume...")) return os.EX_OK =20 - myparams =3D create_depgraph_params(myopts, myaction) try: success, mydepgraph, favorites =3D backtrack_depgraph( settings, trees, myopts, myparams, myaction, myfiles, spinner) @@ -331,7 +331,7 @@ def action_build(settings, trees, mtimedb, if mergecount=3D=3D0: sets =3D trees[settings["ROOT"]]["root_config"].sets world_candidates =3D None - if "--noreplace" in myopts and \ + if "selective" in myparams and \ not oneshot and favorites: # Sets that are not world candidates are filtered # out here since the favorites list needs to be @@ -340,7 +340,7 @@ def action_build(settings, trees, mtimedb, world_candidates =3D [x for x in favorites \ if not (x.startswith(SETPREFIX) and \ not sets[x[1:]].world_candidate)] - if "--noreplace" in myopts and \ + if "selective" in myparams and \ not oneshot and world_candidates: print() for x in world_candidates: diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index a5923dd..9e3064d 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -3591,7 +3591,6 @@ class depgraph(object): empty =3D "empty" in self._dynamic_config.myparams selective =3D "selective" in self._dynamic_config.myparams reinstall =3D False - noreplace =3D "--noreplace" in self._frozen_config.myopts avoid_update =3D "--update" not in self._frozen_config.myopts dont_miss_updates =3D "--update" in self._frozen_config.myopts use_ebuild_visibility =3D self._frozen_config.myopts.get( @@ -3679,16 +3678,6 @@ class depgraph(object): continue =20 cpv =3D pkg.cpv - # Make --noreplace take precedence over --newuse. - if not pkg.installed and noreplace and \ - cpv in vardb.match(atom): - inst_pkg =3D self._pkg(pkg.cpv, "installed", - root_config, installed=3DTrue) - if inst_pkg.visible: - # If the installed version is masked, it may - # be necessary to look at lower versions, - # in case there is a visible downgrade. - continue reinstall_for_flags =3D None =20 if not pkg.installed or \ diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py index 5b5658d..c978ce2 100644 --- a/pym/_emerge/help.py +++ b/pym/_emerge/help.py @@ -565,12 +565,6 @@ def help(myopts, havecolor=3D1): print(" ebuilds, or deps you specify on the command-line = *will* cause") print(" Portage to remerge the package, even if it is alr= eady installed.") print(" Note that Portage won't remerge dependencies by d= efault.") - desc =3D "Also note that this option takes " + \ - "precedence over options such as --newuse, preventing a package " + \ - "from being reinstalled even though the corresponding USE flag settin= gs " + \ - "may have changed." - for line in wrap(desc, desc_width): - print(desc_indent + line) print()=20 print(" "+green("--nospinner")) print(" Disables the spinner regardless of terminal type.= ") @@ -733,8 +727,7 @@ def help(myopts, havecolor=3D1): print() print(" " + green("--selective") + " [ %s | %s ]" % \ (turquoise("y"), turquoise("n"))) - desc =3D "This is similar to the --noreplace option, except that it " = + \ - "does not take precedence over options such as --newuse. " + \ + desc =3D "This identical to the --noreplace option. " + \ "Some options, such as --update, imply --selective. " + \ "Use --selective=3Dn if you want to forcefully disable " + \ "--selective, regardless of options like --update." diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 42ce810..11a3314 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -842,8 +842,7 @@ def parse_opts(tmpcmdline, silent=3DFalse): }, =20 "--selective": { - "help" : "similar to the --noreplace but does not take " + \ - "precedence over options such as --newuse", + "help" : "identical to --noreplace", "type" : "choice", "choices" : true_y_or_n },