From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 32797138247 for ; Tue, 21 Jan 2014 19:39:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5FF3FE0B14; Tue, 21 Jan 2014 19:38:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BAE92E0B07 for ; Tue, 21 Jan 2014 19:38:08 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E03CA33FA9B for ; Tue, 21 Jan 2014 19:38:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 5B55518730 for ; Tue, 21 Jan 2014 19:38:06 +0000 (UTC) From: "Reinis Danne" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Reinis Danne" Message-ID: <1390323756.298f52cea3b60e05a2b851e2ebd745d45045684c.rei4dan@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: eclass/ X-VCS-Repository: proj/sci X-VCS-Files: eclass/alternatives-2.eclass X-VCS-Directories: eclass/ X-VCS-Committer: rei4dan X-VCS-Committer-Name: Reinis Danne X-VCS-Revision: 298f52cea3b60e05a2b851e2ebd745d45045684c X-VCS-Branch: master Date: Tue, 21 Jan 2014 19:38:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 13aa6c8d-5537-43fd-8a63-0440177fd423 X-Archives-Hash: 168610d09781cad2af801dec9d5fbb4c commit: 298f52cea3b60e05a2b851e2ebd745d45045684c Author: Sébastien Fabbro gentoo org> AuthorDate: Tue Jan 21 17:02:36 2014 +0000 Commit: Reinis Danne gmail com> CommitDate: Tue Jan 21 17:02:36 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=298f52ce fixed a bit removing alternative module with newer eselect --- eclass/alternatives-2.eclass | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass index 38a0328..fe2f55e 100644 --- a/eclass/alternatives-2.eclass +++ b/eclass/alternatives-2.eclass @@ -147,13 +147,18 @@ alternatives-2_pkg_prerm() { #echo "Making sure ${alt} has a valid provider" #echo eselect "${alt}" update${ignore} "${provider}" eselect "${alt}" update${ignore} "${provider}" && continue - einfo "Removed ${provider} alternative module for ${alt}, current is $(eselect ${alt} show)" - if [[ $? -eq 2 ]]; then - einfo "Cleaning up unused alternatives module for ${alt}" - echo rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" - rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" || - eerror rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" failed - fi + einfo "Removing ${provider} alternative module for ${alt}, current is $(eselect ${alt} show)" + case $? in + 0) : ;; + 2) + einfo "Cleaning up unused alternatives module for ${alt}" + rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" || \ + eerror rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" failed + ;; + *) + eerror eselect "${alt}" update "${provider}" returned $? + ;; + esac done }