lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 27 Jul 2015 20:36:01 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Pawel Moll <pawel.moll@....com>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tools: perf: Avoid error message when building with no
 python installed

On Mon, Jul 27, 2015 at 04:50:55PM +0100, Pawel Moll wrote:
> When run on a system without a python interpreter installed, the makefile
> probing python will try to execute
> 
> 	/bin/sh -c 'command -v -config [...]'
> 
> instead of
> 
> 	/bin/sh -c 'command -v python-config [...]'
> 
> resulting in the following error message:
> 
> 	sh: 1: command: Illegal option -c
> 
> Although harmless, the message can be quite confusing and hard to track.
> 
> Signed-off-by: Pawel Moll <pawel.moll@....com>
> ---
>  tools/perf/config/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
> index 094ddae..b4a9c29 100644
> --- a/tools/perf/config/Makefile
> +++ b/tools/perf/config/Makefile
> @@ -150,7 +150,7 @@ ifndef NO_LIBPYTHON
>    PYTHON2 := $(if $(call get-executable,python2),python2,python)
>    override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON2))
>    PYTHON2_CONFIG := \
> -    $(if $(call get-executable,$(PYTHON)-config),$(PYTHON)-config,python-config)
> +    $(if $(PYTHON),$(if $(call get-executable,$(PYTHON)-config),$(PYTHON)-config,python-config))
>    override PYTHON_CONFIG := \
>      $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON2_CONFIG))

haven't tried, but seems like we want to add also the else part
to get default into PYTHON_CONFIG?

it fails anyway later either way, but seems like the 'python-config'
was the default case that was meant to fail later

jirka


---
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index f04f92093e37..7cf71a4d3a1f 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -150,7 +150,7 @@ ifndef NO_LIBPYTHON
   PYTHON2 := $(if $(call get-executable,python2),python2,python)
   override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON2))
   PYTHON2_CONFIG := \
-    $(if $(PYTHON),$(if $(call get-executable,$(PYTHON)-config),$(PYTHON)-config,python-config))
+    $(if $(PYTHON),$(if $(call get-executable,$(PYTHON)-config),$(PYTHON)-config,python-config),python-config)
   override PYTHON_CONFIG := \
     $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON2_CONFIG))
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ