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 1RWXsj-0000ON-DU for garchives@archives.gentoo.org; Fri, 02 Dec 2011 18:30:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C59E021C02F; Fri, 2 Dec 2011 18:30:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9654821C02F for ; Fri, 2 Dec 2011 18:30:36 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E95E21B4002 for ; Fri, 2 Dec 2011 18:30:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 5293480044 for ; Fri, 2 Dec 2011 18:30:35 +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: <0ac299616c5cb22befdd9fcd4091d80ca889ef19.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py pym/_emerge/unmerge.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 0ac299616c5cb22befdd9fcd4091d80ca889ef19 Date: Fri, 2 Dec 2011 18:30:35 +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: 5c650a2b-49ec-4d29-bc0d-c87f80206c35 X-Archives-Hash: 04d8d4a23c2ea218a66e0c373bdf66f5 commit: 0ac299616c5cb22befdd9fcd4091d80ca889ef19 Author: Zac Medico gentoo org> AuthorDate: Fri Dec 2 18:30:25 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Dec 2 18:30:25 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D0ac29961 action_depclean: fix return code The fixes some cases where emerge.log would show that depclean was unsuccessful when it was really successful but there was nothing to remove. --- pym/_emerge/actions.py | 13 +++++++++---- pym/_emerge/unmerge.py | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index ba2e631..a62b305 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -588,15 +588,18 @@ def action_depclean(settings, trees, ldpath_mtimes, return rval =20 if cleanlist: - unmerge(root_config, myopts, "unmerge", + if unmerge(root_config, myopts, "unmerge", cleanlist, ldpath_mtimes, ordered=3Dordered, - scheduler=3Dscheduler) + scheduler=3Dscheduler): + rval =3D os.EX_OK + else: + rval =3D 1 =20 if action =3D=3D "prune": - return + return rval =20 if not cleanlist and "--quiet" in myopts: - return + return rval =20 print("Packages installed: " + str(len(vardb.cpv_all()))) print("Packages in world: " + \ @@ -609,6 +612,8 @@ def action_depclean(settings, trees, ldpath_mtimes, else: print("Number removed: "+str(len(cleanlist))) =20 + return rval + def calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spinner): allow_missing_deps =3D bool(args_set) diff --git a/pym/_emerge/unmerge.py b/pym/_emerge/unmerge.py index 852ad93..c76afdf 100644 --- a/pym/_emerge/unmerge.py +++ b/pym/_emerge/unmerge.py @@ -526,7 +526,7 @@ def unmerge(root_config, myopts, unmerge_action, =20 if "--pretend" in myopts: #we're done... return - return 0 + return 1 if "--ask" in myopts: if userquery("Would you like to unmerge these packages?", enter_invalid) =3D=3D "No":