Gentoo Archives: gentoo-user

From: Jon Hardcastle <jd_hardcastle@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] ARGH I uninstalled python
Date: Sat, 23 May 2009 10:50:20
Message-Id: 895095.14267.qm@web51304.mail.re2.yahoo.com
1 --- On Sat, 23/5/09, Jorge Morais <please.no.spam.here@×××××.com> wrote:
2
3 > From: Jorge Morais <please.no.spam.here@×××××.com>
4 > Subject: Re: [gentoo-user] ARGH I uninstalled python
5 > To: gentoo-user@l.g.o
6 > Date: Saturday, 23 May, 2009, 8:55 AM
7 > > Thank you! Thank you! Thank
8 > you!
9 > >
10 > > I followed this
11 > >
12 > > http://blogs.pwmn.net/korkakak/2008/06/04/gentoo-i-unmerged-python-now-what
13 > >
14 > > which worked - in the end. couple of caveats tho for
15 > anyone 'that follows' get python from their site as the ftp
16 > link in this article is out of date.
17 > >
18 > > http://www.python.org/download/releases/
19 > >
20 > > also I initially tried 3.01 and that didn't work so i
21 > installed 2.6.2 which worked 'out of the box' i then tested
22 > with 'emerge' and am now running 'emerge -va python'
23 > >
24 > > Cheers guys!
25 > >
26 > > Thanks to Dale too!
27 >
28 > Glad it worked.
29 > But, I don't know what will happen when the properly
30 > emerged python
31 > overwrites the manually installed Python.
32 >
33 > Does anybody know if the manual python install is
34 > "slotted", in the sense
35 > that it installs files in /usr/lib/python2.6,
36 > /usr/include/python2.6, etc?
37 > If it isn't, and Portage installs a slotted Python, the old
38 > files wouldn't
39 > be overwritten.
40 > And even if it is, the differences between the
41 > differently-configured and
42 > super-patched new python and the vanilla old python could
43 > result in
44 > a different set of file names, so it is possible that the
45 > old python
46 > will not be totally overwritten by the portage-emerged
47 > python.
48 >
49 > If I were you, I would at the very least read the log
50 > (specially its tail)
51 > of the python emerge (emerge logs normally go to
52 > /var/log/emerge).
53 > And you did log the files installed by the manual python
54 > install,
55 > didn't you?
56 >
57 > And why did you try python 3.01 first? You should try a
58 > similar vesion to
59 > what you were previously running. And specifically python
60 > 3.01 is crazy,
61 > as it is widely known that it is *not* compatible with
62 > python 2.x software.
63 > And did you properly uninstall python 3.0.1?
64 >
65 > Also, I didn't like the instructions in this blog very
66 > much.
67 > Wouldn't it be more appropriate to configure python like
68 > portage would?
69 > For example, in my system, where the last python install
70 > was
71 > dev-lang/python-2.5.4-r2  USE="ncurses readline ssl
72 > threads xml -berkdb -build -doc -examples -gdbm -ipv6
73 > -sqlite -tk -ucs2 -wininst"
74 >
75 > the configure line was (from the log)
76 > ./configure --prefix=/usr --host=i686-pc-linux-gnu
77 > --mandir=/usr/share/man --infodir=/usr/share/info
78 > --datadir=/usr/share --sysconfdir=/etc
79 > --localstatedir=/var/lib --with-fpectl --enable-shared
80 > --disable-ipv6 --infodir=${prefix}/share/info
81 > --mandir=${prefix}/share/man --with-libc=
82 > --enable-unicode=ucs4 --with-threads
83 > --build=i686-pc-linux-gnu
84 >
85 > Maybe it would  be nice to install python to 
86 > /usr/local (I'm not sure),
87 > but if you are going to install it in /usr (like portage),
88 > I think you
89 > might as well use the same configure line portage would.
90 > And if you wanted to be really clean, you could apply the
91 > patches that
92 > portage applies.
93 >
94 > And most importantly,
95 > *was this necessary*?
96 > Couldn't he have emerged python by invoking
97 > ebuild
98 > /usr/port/usr/portage/dev-lang/python/python-2.6.2.ebuild
99 > merge
100 > ?
101 > This would do everyting correctly.
102 > And wouldn't it work without Python, since it is written in
103 > Bash?
104 > AFAIK, what needs Python is the high level interface to the
105 > portage
106 > system, while the low-level interface only needs Bash (but
107 > I'm
108 > totally not sure).
109 >
110 > And finally, couldn't he have gotten a binary package from
111 > http://tinderbox.dev.gentoo.org/default-linux/x86/dev-lang/
112 > ?
113 >
114 >
115
116 As it happens it didn't work after all. The emerge broke it again and i got an error from python.
117
118 All of your advise here is fantastic and i urge anyone that follows to do as you suggest - but i didn't fully uninstall either python install and i plan to just leave them minding their own business (hopefully) as i cant be bothered to track all the files down.
119
120 Your final line suggestion to use ebuild worked - although i had to change the path. I am running emerge -va python a and it had the same effect as install from wget and then emerging it. I get
121
122 File "/usr/bin/emerge", line 41
123 except PermissionDenied, e:
124 ^
125 SyntaxError: invalid syntax
126
127 Any clues here?
128
129 -----------------------
130 N: Jon Hardcastle
131 E: Jon@×××××××××××.com
132 'Do not worry about tomorrow, for tomorrow will bring worries of its own.'
133
134 Please sponsor me for the London to Brighton 2009.
135 Just Giving: http://www.justgiving.com/jonathanhardcastle
136 -----------------------