All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Luigi Rizzo <rizzo@iet.unipi.it>, qemu-devel <qemu-devel@nongnu.org>
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] better interpreter specification for scripts
Date: Fri, 15 Nov 2013 08:01:37 +0100	[thread overview]
Message-ID: <5285C6D1.2080503@weilnetz.de> (raw)
In-Reply-To: <CA+hQ2+j+Ww4OhHL2tMFdYHaH4FVvtCqYAVCRmbzOBfij=GJVBA@mail.gmail.com>

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

Am 15.11.2013 07:51, schrieb Luigi Rizzo:
> some of the new scripts in scripts/ specify a interpreter path
> which is not always pointing to the right place.
> I see that an alternative format is also being used
>         #!/usr/bin/env <interpreter_name>
> which seems to work better.
>
> The patch below is merely to let master compile on FreeBSD,
> but there are other offending files that can be found with
>  grep '#!' scripts/*

There is no need to fix acpi_extract.py here, because the error is in
hw/i386/Makefile.objs:

It should call the script using $(PYTHON). Otherwise it won't use the
Python interpreter
which was specified when configure was called with
--python=PYTHON-INTERPRETER.

wrong: hw/i386/Makefile.objs:  $(call quiet-command, $(SRC_PATH)/scripts/...

correct: hw/i386/Makefile.objs:  $(call quiet-command, $(PYTHON)
$(SRC_PATH)/scripts/...

This should be fixed for QEMU 1.7 (send patch with [PATCH for 1.7]).

Stefan

>
> Signed-off-by: Luigi Rizzo <rizzo@iet.unipi.it
> <mailto:rizzo@iet.unipi.it>>
> ---
>  scripts/acpi_extract.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/acpi_extract.py b/scripts/acpi_extract.py
> index 22ea468..66c1b3e 100755
> --- a/scripts/acpi_extract.py
> +++ b/scripts/acpi_extract.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/python
> +#!/usr/bin/env python
>  # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin
> <mst@redhat.com <mailto:mst@redhat.com>>
>  #
>  # This program is free software; you can redistribute it and/or modify
> --
> 1.8.1.2
>


[-- Attachment #2: Type: text/html, Size: 5208 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Weil <sw@weilnetz.de>
To: Luigi Rizzo <rizzo@iet.unipi.it>, qemu-devel <qemu-devel@nongnu.org>
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] better interpreter specification for scripts
Date: Fri, 15 Nov 2013 08:01:37 +0100	[thread overview]
Message-ID: <5285C6D1.2080503@weilnetz.de> (raw)
In-Reply-To: <CA+hQ2+j+Ww4OhHL2tMFdYHaH4FVvtCqYAVCRmbzOBfij=GJVBA@mail.gmail.com>

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

Am 15.11.2013 07:51, schrieb Luigi Rizzo:
> some of the new scripts in scripts/ specify a interpreter path
> which is not always pointing to the right place.
> I see that an alternative format is also being used
>         #!/usr/bin/env <interpreter_name>
> which seems to work better.
>
> The patch below is merely to let master compile on FreeBSD,
> but there are other offending files that can be found with
>  grep '#!' scripts/*

There is no need to fix acpi_extract.py here, because the error is in
hw/i386/Makefile.objs:

It should call the script using $(PYTHON). Otherwise it won't use the
Python interpreter
which was specified when configure was called with
--python=PYTHON-INTERPRETER.

wrong: hw/i386/Makefile.objs:  $(call quiet-command, $(SRC_PATH)/scripts/...

correct: hw/i386/Makefile.objs:  $(call quiet-command, $(PYTHON)
$(SRC_PATH)/scripts/...

This should be fixed for QEMU 1.7 (send patch with [PATCH for 1.7]).

Stefan

>
> Signed-off-by: Luigi Rizzo <rizzo@iet.unipi.it
> <mailto:rizzo@iet.unipi.it>>
> ---
>  scripts/acpi_extract.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/acpi_extract.py b/scripts/acpi_extract.py
> index 22ea468..66c1b3e 100755
> --- a/scripts/acpi_extract.py
> +++ b/scripts/acpi_extract.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/python
> +#!/usr/bin/env python
>  # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin
> <mst@redhat.com <mailto:mst@redhat.com>>
>  #
>  # This program is free software; you can redistribute it and/or modify
> --
> 1.8.1.2
>


[-- Attachment #2: Type: text/html, Size: 5208 bytes --]

  reply	other threads:[~2013-11-15  7:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-15  6:51 [Qemu-trivial] [PATCH] better interpreter specification for scripts Luigi Rizzo
2013-11-15  6:51 ` [Qemu-devel] " Luigi Rizzo
2013-11-15  7:01 ` Stefan Weil [this message]
2013-11-15  7:01   ` Stefan Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5285C6D1.2080503@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rizzo@iet.unipi.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.