Re: [gentoo-user] Samba wants to downgrade my python....

2012-09-16 Thread Randolph Maaßen
On Sep 16, 2012 1:05 PM, Andrew Lowe a...@wht.com.au wrote:

 Hi all,
 I've got a media server that I'm in the process of installing
Samba on. When I do:

 emerge -NuD --pretend samba

 I get a list of stuff that portage wants to install, including Python,
V2.7.3, even though the machine already has V3.2.3 installed. I've also
stripped down the USE variables to basically server and that's all and
still for some reason portage wants to bring in Python - the older version,
V2. I've even added a -python to packages.use and it still wants python,
V2. I've had a look at the USE variables for the packages that follow
Python in the emerge list and they either don't want python or already have
-python set.

 Having a play around with equery also didn't reveal anything.
Does anyone have any ideas as to what's causing old Python to be brought
in? I haven't posted the whole emerge --info stuff yet as hopefully
someone has come across this problem before.

 Any thoughts greatly appreciated,

 Andrew


Hi, when you are dealing with python always remember that the API has
changed between version 2 and 3 so python 3 can't handle python 2 scripts.

So what I think emerge is doing here is installing python 2.7 beside 3.2.

When you add the verbose flag to the emerge command, you will probably see
something like [ NS ] or [ uS ] at the beginning of the python line. The S
stands for new slot, so both version will be installedbecause samba or one
of it's dependency is using python 2 scripts.

Mit freundlichen Grüßen / Best Regards

Randolph Maaßen


Re: [gentoo-user] Samba wants to downgrade my python....

2012-09-16 Thread Alan McKinnon
On Sun, 16 Sep 2012 18:59:33 +0800
Andrew Lowe a...@wht.com.au wrote:

 Hi all,
   I've got a media server that I'm in the process of installing
 Samba on. When I do:
 
 emerge -NuD --pretend samba
 
 I get a list of stuff that portage wants to install, including
 Python, V2.7.3, even though the machine already has V3.2.3 installed.
 I've also stripped down the USE variables to basically server and
 that's all and still for some reason portage wants to bring in Python
 - the older version, V2. I've even added a -python to packages.use
 and it still wants python, V2. I've had a look at the USE variables
 for the packages that follow Python in the emerge list and they
 either don't want python or already have -python set.
 
   Having a play around with equery also didn't reveal anything.
 Does anyone have any ideas as to what's causing old Python to be
 brought in? I haven't posted the whole emerge --info stuff yet as
 hopefully someone has come across this problem before.
 
   Any thoughts greatly appreciated,
 
   Andrew
 

Python is slotted (see gentoo docs for more info on SLOTS).

Samba is not downgrading python, it is asking for python-2.7 to be
installed alongside python-3.2 (so you will then have both).

Just accept what portage says and let it do it;s thing - there are many
packages out there that are not ported to python-3 yet so you almost
certainly are going to need python-2.7 at some point anyway.

-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] Samba wants to downgrade my python....

2012-09-16 Thread Neil Bothwick
On Sun, 16 Sep 2012 18:59:33 +0800, Andrew Lowe wrote:

 I've had a look at the USE variables for the packages 
 that follow Python in the emerge list and they either don't want python 
 or already have -python set.

You've already had a reply about the slotted nature of python, but you
also need to understand that USE flags are not dependency lists. USE
flags cover optional features, if a package has an option python module,
bindings or scripts, a USE flag may determine whether they are installed.
But if a package needs python2, no amount of fudging with USE flags will
change that fact.


-- 
Neil Bothwick

Programmer (n): A red-eyed, mumbling mammal capable of conversing
with inanimate objects.


signature.asc
Description: PGP signature


Re: [gentoo-user] Samba wants to downgrade my python....

2012-09-16 Thread Marc Joliet
Am Sun, 16 Sep 2012 18:59:33 +0800
schrieb Andrew Lowe a...@wht.com.au:

 Hi all,

Hi,

   I've got a media server that I'm in the process of installing Samba on. 
 When I do:
 
 emerge -NuD --pretend samba
 
 I get a list of stuff that portage wants to install, including Python, 
 V2.7.3, even though the machine already has V3.2.3 installed. I've also 
 stripped down the USE variables to basically server and that's all and 
 still for some reason portage wants to bring in Python - the older 
 version, V2. I've even added a -python to packages.use and it still 
 wants python, V2. I've had a look at the USE variables for the packages 
 that follow Python in the emerge list and they either don't want python 
 or already have -python set.
 
   Having a play around with equery also didn't reveal anything. Does 
 anyone have any ideas as to what's causing old Python to be brought in? 
 I haven't posted the whole emerge --info stuff yet as hopefully 
 someone has come across this problem before.

First of all: Python 2 and 3 are (partly) incompatible versions of the language.
They can be installed in parallel in different slots (the emerge output will
have contained NS at one point, for New Slot). So you are not so much
downgrading python as installing an older version in addition to the current
version. Although older and newer are misleading, since they have both been
under active development in parallel since Python 3 was released.

Second: you can use the -t (or --tree) option of emerge to get a tree view
of the dependencies, so that you can see what exactly is pulling in
python-2.7.3. But it sounds like some dependency of samba has a hard dependency
on Python 2, so you probably cannot control it.

   Any thoughts greatly appreciated,
 
   Andrew

HTH
-- 
Marc Joliet
--
People who think they know everything really annoy those of us who know we
don't - Bjarne Stroustrup


signature.asc
Description: PGP signature


Re: [gentoo-user] Samba wants to downgrade my python....

2012-09-16 Thread Andrew Lowe

On 09/16/12 19:19, Randolph Maaßen wrote:

On Sep 16, 2012 1:05 PM, Andrew Lowe a...@wht.com.au
mailto:a...@wht.com.au wrote:
 
  Hi all,
  I've got a media server that I'm in the process of installing
Samba on. When I do:
 
  emerge -NuD --pretend samba
 
  I get a list of stuff that portage wants to install, including
Python, V2.7.3, even though the machine already has V3.2.3 installed.
I've also stripped down the USE variables to basically server and
that's all and still for some reason portage wants to bring in Python -
the older version, V2. I've even added a -python to packages.use and
it still wants python, V2. I've had a look at the USE variables for the
packages that follow Python in the emerge list and they either don't
want python or already have -python set.
 
  Having a play around with equery also didn't reveal anything.
Does anyone have any ideas as to what's causing old Python to be brought
in? I haven't posted the whole emerge --info stuff yet as hopefully
someone has come across this problem before.
 
  Any thoughts greatly appreciated,
 
  Andrew
 

Hi, when you are dealing with python always remember that the API has
changed between version 2 and 3 so python 3 can't handle python 2 scripts.

So what I think emerge is doing here is installing python 2.7 beside 3.2.

When you add the verbose flag to the emerge command, you will probably
see something like [ NS ] or [ uS ] at the beginning of the python line.
The S stands for new slot, so both version will be installedbecause
samba or one of it's dependency is using python 2 scripts.


Randolph,
	You have guessed correctly, I get NS. But to me, the question is why do 
I even need python at all for something that is a file sharing daemon? 
I've turned off CUPS etc etc, I just want file sharing to the M$ world, 
not all the other fluff. I suppose I'll have to have a look at the 
ebuild to try and work out why this thingy wants Python, any python, in 
the first place.


Andrew




Re: [gentoo-user] Samba wants to downgrade my python....

2012-09-16 Thread Neil Bothwick
On Sun, 16 Sep 2012 19:32:11 +0800, Andrew Lowe wrote:

 I suppose I'll have to have a look at the 
 ebuild to try and work out why this thingy wants Python, any python, in 
 the first place.

Portage is written in Python, which raises the question of why you didn't
have python:2 installed in the first place. The samba ebuild doesn't
include a dependency on python, so you'll need to do and emerge -t to see
which packages do pull it in, but I suspect it is required by an eclass
inherited by one of the ebuilds.

If so, Samba itself does not need Python to do it's job, but portage
needs Python in order to install Samba. that would make it a build
dependency which could be uninstalled after Samba was merged, but I'd be
nervous about removing Python from any Gentoo system that uses portage.

-- 
Neil Bothwick

Top Oxymorons Number 47: Act naturally


signature.asc
Description: PGP signature


Re: [gentoo-user] Samba wants to downgrade my python....

2012-09-16 Thread Andrew Lowe

On 09/16/12 19:53, Neil Bothwick wrote:

On Sun, 16 Sep 2012 19:32:11 +0800, Andrew Lowe wrote:


I suppose I'll have to have a look at the
ebuild to try and work out why this thingy wants Python, any python, in
the first place.


Portage is written in Python, which raises the question of why you didn't
have python:2 installed in the first place. The samba ebuild doesn't
include a dependency on python, so you'll need to do and emerge -t to see
which packages do pull it in, but I suspect it is required by an eclass
inherited by one of the ebuilds.

If so, Samba itself does not need Python to do it's job, but portage
needs Python in order to install Samba. that would make it a build
dependency which could be uninstalled after Samba was merged, but I'd be
nervous about removing Python from any Gentoo system that uses portage.


Neil,
	Looks like you've hit the nail on the head. The media machine has just 
had a new install of Gentoo done and according to eselect python list, 
I only have V3.2. Nothing has been removed, just a few things added so 
it looks like the default install only does V3.2. Looks like I'll have 
to put up with it, the compile time on the little machine is a killer, 
and let the install happen.


Thanks for the feedback everyone,

Andrew



Re: [gentoo-user] Samba wants to downgrade my python....

2012-09-16 Thread Kerin Millar

Andrew Lowe wrote:

On 09/16/12 19:53, Neil Bothwick wrote:

On Sun, 16 Sep 2012 19:32:11 +0800, Andrew Lowe wrote:


I suppose I'll have to have a look at the
ebuild to try and work out why this thingy wants Python, any python, in
the first place.


Portage is written in Python, which raises the question of why you didn't
have python:2 installed in the first place. The samba ebuild doesn't
include a dependency on python, so you'll need to do and emerge -t to see
which packages do pull it in, but I suspect it is required by an eclass
inherited by one of the ebuilds.

If so, Samba itself does not need Python to do it's job, but portage
needs Python in order to install Samba. that would make it a build
dependency which could be uninstalled after Samba was merged, but I'd be
nervous about removing Python from any Gentoo system that uses portage.


Neil,
Looks like you've hit the nail on the head. The media machine has just
had a new install of Gentoo done and according to eselect python list,
I only have V3.2. Nothing has been removed, just a few things added so
it looks like the default install only does V3.2. Looks like I'll have
to put up with it, the compile time on the little machine is a killer,
and let the install happen.


Portage works with either instance of python and its ebuild has 
python2 and python3 USE flags. Alas, the build system of 
sys-libs/talloc seems to require python:2.6 or python:2.7. I would 
suggest adding dev-lang/python:2.7 to the world file so as to protect it 
from being reaped by emerge --depclean, only to be required again for 
future builds.


Incidentally, one of the first things I do on a Gentoo system is mask 
=dev-lang/python-3.0 and rebuild affected packages against python-2.7. 
I have yet to find a single instance where having both installed is 
helpful. Even major applications such as Django still don't support Py3k.


Regarding the increase in compilation time, you could get a head start 
by grabbing a binary package from tinderbox.dev.gentoo.org.


Cheers,

--Kerin