This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: [PATCH] tools: python portability fixes

On Monday 27 July 2009 20:57:28 Ian Jackson wrote:
> Christoph Egger writes ("[PATCH] tools: python portability fixes"):
> > Attached patch applies portability fixes for NetBSD:
> Hi.  As Keir says, I'm away, but:
> > - remove useless get-path. It is a bash specific script which tries to
> >   gain information the build system already has.
> > - make install-wrap work with bourne shell on NetBSD
> > - pass `which $(PYTHON)` to install-wrap. It is safe to assume
> >   this always works because in case it doesn't the build system
> >   errors out very early in tools/check/check_python
> Isn't the effect of this to stop substituting #!/usr/bin/python2.5 (or
> whatever) for #!/usr/bin/python ?  In which case it's wrong as I've
> already explained.

No, the effect is this:

When $(PYTHON) is python you get #!/usr/bin/python,
when $(PYTHON) is python2.5 you get #!/usr/bin/python2.5,
when $(PYTHON) is python2.6 you get #!/usr/bin/python2.6,
when $(PYTHON) is /usr/bin/python2.4 you get #!/usr/bin/python2.4,

When you install python on NetBSD, you don't have a "python"
binary. You always have pythonN.M where N.M is the version number
so you can have multiple python versions installed.
On NetBSD, you actually get #!/usr/pkg/bin/python2.5.
The get-path is a bash specific script which tries to get the information
`which $(PYTHON)` already provides but doesn't work for the case
where "python" doesn't exist.

The current approach is doomed to always fail on NetBSD.

On Linux you have a python symlink to pythonN.M.
Remove the symlink manually, build and install xen with
gmake PYTHON=pythonN.M and you can reproduce the issue on Linux.

The patch fixes it.


---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

Xen-devel mailing list