public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] python-wrapper breaks init scripts
@ 2009-10-04 18:32 Hanno Böck
  2009-10-04 19:02 ` Arfrever Frehtes Taifersar Arahesis
  0 siblings, 1 reply; 5+ messages in thread
From: Hanno Böck @ 2009-10-04 18:32 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

Hi,

I just stepped over a problem with the new python-wrapper. If I interpreted 
the changelogs correctly, since eselect-python-20090801 /usr/bin/python is no 
longer a symlink, but a wrapper.

I find this a questionable idea simply for the overhead it causes, but it 
seems that this breaks all init-scripts using start-stop-daemon for python 
scripts.

Example:
http://bugs.gentoo.org/show_bug.cgi?id=286191

(same issue happens with some self-written python daemons we're using on our 
servers)

I don't know what the reasons were for the change from symlinks to a wrapper, 
but if it should stay the way it is, we need a fix for those issues.

-- 
Hanno Böck		Blog:		http://www.hboeck.de/
GPG: 3DBD3B20		Jabber/Mail:	hanno@hboeck.de

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-dev] python-wrapper breaks init scripts
  2009-10-04 18:32 [gentoo-dev] python-wrapper breaks init scripts Hanno Böck
@ 2009-10-04 19:02 ` Arfrever Frehtes Taifersar Arahesis
  2009-10-05  7:46   ` Michael Haubenwallner
  0 siblings, 1 reply; 5+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2009-10-04 19:02 UTC (permalink / raw
  To: Gentoo Development

[-- Attachment #1: Type: Text/Plain, Size: 1230 bytes --]

2009-10-04 20:32:17 Hanno Böck napisał(a):
> I just stepped over a problem with the new python-wrapper. If I interpreted 
> the changelogs correctly, since eselect-python-20090801 /usr/bin/python is no 
> longer a symlink, but a wrapper.

Since eselect-python-20090804 /usr/bin/python is a symlink to a wrapper.
 
> I find this a questionable idea simply for the overhead it causes, but it 
> seems that this breaks all init-scripts using start-stop-daemon for python 
> scripts.
> 
> Example:
> http://bugs.gentoo.org/show_bug.cgi?id=286191
> 
> (same issue happens with some self-written python daemons we're using on our 
> servers)
> 
> I don't know what the reasons were for the change from symlinks to a wrapper

Ebuilds (usually through python.eclass) need to be able to set requested version
of Python without changing /usr/bin/python symlink. This is performed by setting
EPYTHON environment variable ("E" in the name of this variable is related to words
"ebuild" and "eclass"). If this variable isn't set, then Python wrapper uses
version of Python configured using `eselect python`. Otherwise it uses version of
Python referenced by this variable.

-- 
Arfrever Frehtes Taifersar Arahesis

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-dev] python-wrapper breaks init scripts
  2009-10-04 19:02 ` Arfrever Frehtes Taifersar Arahesis
@ 2009-10-05  7:46   ` Michael Haubenwallner
  2009-10-05 20:32     ` [gentoo-dev] " Jonathan Callen
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Haubenwallner @ 2009-10-05  7:46 UTC (permalink / raw
  To: gentoo-dev


Arfrever Frehtes Taifersar Arahesis wrote:
> 2009-10-04 20:32:17 Hanno Böck napisał(a):
>> I just stepped over a problem with the new python-wrapper. If I interpreted 
>> the changelogs correctly, since eselect-python-20090801 /usr/bin/python is no 
>> longer a symlink, but a wrapper.
> 
> Since eselect-python-20090804 /usr/bin/python is a symlink to a wrapper.
>  
>> I find this a questionable idea simply for the overhead it causes, but it 
>> seems that this breaks all init-scripts using start-stop-daemon for python 
>> scripts.
>>
>> Example:
>> http://bugs.gentoo.org/show_bug.cgi?id=286191
>>
>> (same issue happens with some self-written python daemons we're using on our 
>> servers)
>>
>> I don't know what the reasons were for the change from symlinks to a wrapper
> 
> Ebuilds (usually through python.eclass) need to be able to set requested version
> of Python without changing /usr/bin/python symlink. This is performed by setting
> EPYTHON environment variable ("E" in the name of this variable is related to words
> "ebuild" and "eclass"). If this variable isn't set, then Python wrapper uses
> version of Python configured using `eselect python`. Otherwise it uses version of
> Python referenced by this variable.

The problem here IMO is that this wrapper executes python2.6 with argv0 set
to python2.6, while it should be the argv0 from how the wrapper was executed.
At least this is what init.d scripts expect (seen with ntlmaps too).

/haubi/



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

* [gentoo-dev] Re: python-wrapper breaks init scripts
  2009-10-05  7:46   ` Michael Haubenwallner
@ 2009-10-05 20:32     ` Jonathan Callen
  2009-10-05 20:40       ` Fabian Groffen
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Callen @ 2009-10-05 20:32 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Haubenwallner wrote:
> The problem here IMO is that this wrapper executes python2.6 with argv0 set
> to python2.6, while it should be the argv0 from how the wrapper was executed.
> At least this is what init.d scripts expect (seen with ntlmaps too).
> 
> /haubi/
> 

Unfortunately, if argv[0] is *not* set to python2.6, it appears that
some python programs crash, thereby making this a lose-lose proposition.
 I believe there is a way to make s-s-d stop a program by looking only
at its pid, via a .pid file, which you may be able to use to work around
the issue.

- --
Jonathan Callen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrKV8sACgkQOypDUo0oQOog6QCg18/A06tmecCa/5L6r7qoKAO1
urAAoKIHKiZyKveYoDwCQZ/woeRQdwY/
=C9ao
-----END PGP SIGNATURE-----



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

* Re: [gentoo-dev] Re: python-wrapper breaks init scripts
  2009-10-05 20:32     ` [gentoo-dev] " Jonathan Callen
@ 2009-10-05 20:40       ` Fabian Groffen
  0 siblings, 0 replies; 5+ messages in thread
From: Fabian Groffen @ 2009-10-05 20:40 UTC (permalink / raw
  To: gentoo-dev

On 05-10-2009 16:32:58 -0400, Jonathan Callen wrote:
> Michael Haubenwallner wrote:
> > The problem here IMO is that this wrapper executes python2.6 with argv0 set
> > to python2.6, while it should be the argv0 from how the wrapper was executed.
> > At least this is what init.d scripts expect (seen with ntlmaps too).
> 
> Unfortunately, if argv[0] is *not* set to python2.6, it appears that
> some python programs crash, thereby making this a lose-lose proposition.

I think we need to see if we can identify those packages and what is the
real problem then.  Python does some awful processing during startup to
determine its own prefix, pythonpath etc.  We might be able to just
patch our python to behave.


-- 
Fabian Groffen
Gentoo on a different level



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

end of thread, other threads:[~2009-10-05 20:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-04 18:32 [gentoo-dev] python-wrapper breaks init scripts Hanno Böck
2009-10-04 19:02 ` Arfrever Frehtes Taifersar Arahesis
2009-10-05  7:46   ` Michael Haubenwallner
2009-10-05 20:32     ` [gentoo-dev] " Jonathan Callen
2009-10-05 20:40       ` Fabian Groffen

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