1 |
First of all, it didn't work at all (lacked SVN unpack commands). Since |
2 |
eselect-python has been migrated to git, I have replaced the SVN code |
3 |
with git one as well. |
4 |
|
5 |
Secondly, I have set 'eselect python update' commands to run |
6 |
unconditionally, and added '--if-unset'. This doesn't hurt and should |
7 |
handle any future updates and fixing broken systems (as in, if user |
8 |
breaks python symlinks, he just needs to reinstall eselect-python). |
9 |
|
10 |
Thirdly, I have split 'eselect python update' into '--python2' |
11 |
and '--python3' parts. This will ensure that both python2 & python3 |
12 |
implementation will be kept sane (and the active one will update |
13 |
the main interpreter as well). |
14 |
--- |
15 |
.../eselect-python/eselect-python-99999999.ebuild | 31 +++++++++++----------- |
16 |
1 file changed, 15 insertions(+), 16 deletions(-) |
17 |
|
18 |
diff --git a/gx86/app-admin/eselect-python/eselect-python-99999999.ebuild b/gx86/app-admin/eselect-python/eselect-python-99999999.ebuild |
19 |
index 4111ba1..08d3abc 100644 |
20 |
--- a/gx86/app-admin/eselect-python/eselect-python-99999999.ebuild |
21 |
+++ b/gx86/app-admin/eselect-python/eselect-python-99999999.ebuild |
22 |
@@ -5,11 +5,10 @@ |
23 |
# Keep the EAPI low here because everything else depends on it. |
24 |
# We want to make upgrading simpler. |
25 |
|
26 |
-ESVN_PROJECT="eselect-python" |
27 |
-ESVN_REPO_URI="https://overlays.gentoo.org/svn/proj/python/projects/eselect-python/trunk" |
28 |
- |
29 |
if [[ ${PV} == "99999999" ]] ; then |
30 |
- inherit autotools subversion |
31 |
+ EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/${PN}.git |
32 |
+ http://git.overlays.gentoo.org/gitroot/proj/${PN}.git" |
33 |
+ inherit autotools git-2 |
34 |
else |
35 |
SRC_URI="mirror://gentoo/${P}.tar.bz2" |
36 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
37 |
@@ -31,7 +30,12 @@ else |
38 |
fi |
39 |
|
40 |
src_unpack() { |
41 |
- unpack ${A} |
42 |
+ if [[ ${PV} == "99999999" ]] ; then |
43 |
+ git-2_src_unpack |
44 |
+ else |
45 |
+ unpack ${A} |
46 |
+ fi |
47 |
+ |
48 |
cd "${S}" |
49 |
[[ -x configure ]] || eautoreconf |
50 |
} |
51 |
@@ -41,16 +45,11 @@ src_install() { |
52 |
emake DESTDIR="${D}" install || die |
53 |
} |
54 |
|
55 |
-pkg_preinst() { |
56 |
- if has_version "<${CATEGORY}/${PN}-20090804" || ! has_version "${CATEGORY}/${PN}"; then |
57 |
- run_eselect_python_update="1" |
58 |
- fi |
59 |
-} |
60 |
- |
61 |
pkg_postinst() { |
62 |
- if [[ "${run_eselect_python_update}" == "1" ]]; then |
63 |
- ebegin "Running \`eselect python update\`" |
64 |
- eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 > /dev/null |
65 |
- eend "$?" |
66 |
- fi |
67 |
+ ebegin "Running 'eselect python update'" |
68 |
+ |
69 |
+ eselect python update --python2 --if-unset |
70 |
+ eselect python update --python3 --if-unset |
71 |
+ |
72 |
+ eend ${?} |
73 |
} |
74 |
-- |
75 |
1.7.12.4 |