From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-python+bounces-192-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id AA15D138010 for <garchives@archives.gentoo.org>; Thu, 1 Nov 2012 09:49:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 17EF4E062C; Thu, 1 Nov 2012 09:49:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2A31BE062C for <gentoo-python@lists.gentoo.org>; Thu, 1 Nov 2012 09:49:24 +0000 (UTC) Received: from pomiocik.lan (213-238-96-169.adsl.inetia.pl [213.238.96.169]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 6153D33D9D8; Thu, 1 Nov 2012 09:49:22 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> To: gentoo-python@lists.gentoo.org Cc: python@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> Subject: [gentoo-python] [PATCH] eselect-python: update and clean the live ebuild up. Date: Thu, 1 Nov 2012 10:50:16 +0100 Message-Id: <1351763416-6557-1-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.7.12.4 Precedence: bulk List-Post: <mailto:gentoo-python@lists.gentoo.org> List-Help: <mailto:gentoo-python+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-python+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-python+subscribe@lists.gentoo.org> List-Id: Discussions centering around the Python ecosystem in Gentoo Linux <gentoo-python.gentoo.org> X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org X-Archives-Salt: aa52b04f-441b-4f98-8dc7-d436551d7f67 X-Archives-Hash: dab10ddf1a6e26ec4a3041cdb62388ca First of all, it didn't work at all (lacked SVN unpack commands). Since eselect-python has been migrated to git, I have replaced the SVN code with git one as well. Secondly, I have set 'eselect python update' commands to run unconditionally, and added '--if-unset'. This doesn't hurt and should handle any future updates and fixing broken systems (as in, if user breaks python symlinks, he just needs to reinstall eselect-python). Thirdly, I have split 'eselect python update' into '--python2' and '--python3' parts. This will ensure that both python2 & python3 implementation will be kept sane (and the active one will update the main interpreter as well). --- .../eselect-python/eselect-python-99999999.ebuild | 31 +++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/gx86/app-admin/eselect-python/eselect-python-99999999.ebuild b/gx86/app-admin/eselect-python/eselect-python-99999999.ebuild index 4111ba1..08d3abc 100644 --- a/gx86/app-admin/eselect-python/eselect-python-99999999.ebuild +++ b/gx86/app-admin/eselect-python/eselect-python-99999999.ebuild @@ -5,11 +5,10 @@ # Keep the EAPI low here because everything else depends on it. # We want to make upgrading simpler. -ESVN_PROJECT="eselect-python" -ESVN_REPO_URI="https://overlays.gentoo.org/svn/proj/python/projects/eselect-python/trunk" - if [[ ${PV} == "99999999" ]] ; then - inherit autotools subversion + EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/${PN}.git + http://git.overlays.gentoo.org/gitroot/proj/${PN}.git" + inherit autotools git-2 else SRC_URI="mirror://gentoo/${P}.tar.bz2" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" @@ -31,7 +30,12 @@ else fi src_unpack() { - unpack ${A} + if [[ ${PV} == "99999999" ]] ; then + git-2_src_unpack + else + unpack ${A} + fi + cd "${S}" [[ -x configure ]] || eautoreconf } @@ -41,16 +45,11 @@ src_install() { emake DESTDIR="${D}" install || die } -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-20090804" || ! has_version "${CATEGORY}/${PN}"; then - run_eselect_python_update="1" - fi -} - pkg_postinst() { - if [[ "${run_eselect_python_update}" == "1" ]]; then - ebegin "Running \`eselect python update\`" - eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 > /dev/null - eend "$?" - fi + ebegin "Running 'eselect python update'" + + eselect python update --python2 --if-unset + eselect python update --python3 --if-unset + + eend ${?} } -- 1.7.12.4