Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-python
Navigation:
Lists: gentoo-python: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: djc@g.o
From: Mike Gilbert <floppym@g.o>
Subject: Re: Testing dev-lang/python version bumps
Date: Sat, 28 Apr 2012 13:14:38 -0400
On 04/27/2012 01:24 PM, Mike Gilbert wrote:
> On 04/27/2012 01:17 PM, Mike Gilbert wrote:
>> On 04/27/2012 12:35 PM, Dirkjan Ochtman wrote:
>>>>> 3. Added 61_all_process_data.patch, for which the goal seems somewhat unclear.
>>>> This is some logic for python-wrapper that was in the 2.7.2 patchset as
>>>> well. If you want to drop it, I'm sure that will require some
>>>> re-engineering of python-wrapper.
>>>
>>> Right. Do you know what this fixes, and how/why it will be
>>> re-engineered? As long as we don't know these things, I'd prefer to
>>> leave the patch out rather than include it.
>>>
>>
>> I have been bitten in the past by removing things that I don't fully
>> understand, so I'm trying to avoid doing that. I guess I can drop it and
>> see what happens.
>>
> 
> I will add investigating this patch to my todo list. Hopefully Arfrever
> can explain the rationale to me, and I can relay that.
> 
> Otherwise, I will have to figure it out the hard way.
> 

Had a chat with Arfrever last night about this.

The variables introduced in 61_all_process_data.patch are there to make
the scripts created by python_generate_wrapper_scripts as transparent as
possible. Specifically, they are used to manipulate sys.argv[0] in
python, argv[1] in C, and the "process name" as set by
prctl(PR_SET_NAME, ...).

This allows /usr/bin/A (wrapper) to call /usr/bin/A-2.7 (real script),
but still have /usr/bin/A in sys.argv[0].

This is mainly useful for supporting python scripts which vary their
behavior based on sys.argv[0]. The eclean program from gentoolkit does
this, for example. That's probably not the best example since it does
not use a python.eclass generated wrapper, but it illustrates the concept.

The process name is used by utilities like killall to find the process
to kill. I believe it is also used in top's display.

Arfrever also claims that this should help start-stop-daemon to detect
which process to kill, but I have not been able to verify this claim.
See bug 286191 for reference.

Attachment:
signature.asc (OpenPGP digital signature)
References:
Testing dev-lang/python version bumps
-- Mike Gilbert
Re: Testing dev-lang/python version bumps
-- Dirkjan Ochtman
Re: Testing dev-lang/python version bumps
-- Mike Gilbert
Re: Testing dev-lang/python version bumps
-- Dirkjan Ochtman
Re: Testing dev-lang/python version bumps
-- Mike Gilbert
Re: Testing dev-lang/python version bumps
-- Mike Gilbert
Navigation:
Lists: gentoo-python: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Testing dev-lang/python version bumps
Next by thread:
Re: Testing dev-lang/python version bumps
Previous by date:
Re: Testing dev-lang/python version bumps
Next by date:
Re: Testing dev-lang/python version bumps


Updated Jun 29, 2012

Summary: Archive of the gentoo-python mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.