public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-python] [PATCH] eselect-python: update and clean the live ebuild up.
@ 2012-11-01  9:50 Michał Górny
       [not found] ` <CAJ0EP40syd5=xSkB2_AAUvLERfdmL3meNhhQCjbTvVW5xec03Q@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2012-11-01  9:50 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-python] Re: [PATCH] eselect-python: update and clean the live ebuild up.
       [not found] ` <CAJ0EP40syd5=xSkB2_AAUvLERfdmL3meNhhQCjbTvVW5xec03Q@mail.gmail.com>
@ 2012-11-01 18:47   ` Mike Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Gilbert @ 2012-11-01 18:47 UTC (permalink / raw
  To: gentoo-python

On Thu, Nov 1, 2012 at 12:27 PM, Mike Gilbert <floppymaster@gmail.com> wrote:
> On Thu, Nov 1, 2012 at 5:50 AM, Michał Górny <mgorny@gentoo.org> wrote:
>> 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).
>
> Let's have releng test this patch; the pkg_postinst changes might
> cause some issue for stage building.
>
> Otherwise, looks fine.

I sent the above reply from the wrong address, so just re-sending to the list.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-01 18:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-01  9:50 [gentoo-python] [PATCH] eselect-python: update and clean the live ebuild up Michał Górny
     [not found] ` <CAJ0EP40syd5=xSkB2_AAUvLERfdmL3meNhhQCjbTvVW5xec03Q@mail.gmail.com>
2012-11-01 18:47   ` [gentoo-python] " Mike Gilbert

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