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, 28 Jul 2014 09:06:54 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Thomas Ilsche <thomas.ilsche@...dresden.de>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>, Jiri Olsa <jolsa@...hat.com>
Subject: Re: [PATCH 2/2] perf tools: Default to python version 2

Hi Thomas,

On Fri, 25 Jul 2014 13:43:24 +0200, Thomas Ilsche wrote:
> Hi Namhyung,
>
> apologies for mixing up your first name earlier.

It's okay, nevermind. :)


> On 2014-07-25 12:24, Namhyung Kim wrote:
>> On Fri, 25 Jul 2014 11:28:55 +0200, Thomas Ilsche wrote:
>>>  ifndef NO_LIBPYTHON
>>> -  override PYTHON := \
>>> -    $(call get-executable-or-default,PYTHON,python)
>>> +  PYTHON2 := $(call get-executable-or-default,PYTHON,python2)
>> 
>> But wouldn't it set PYTHON2 to python2 even if the system doesn't have
>> python2 actually?
>> 
>> 
>>> +  override PYTHON := $(if $(PYTHON2),$(PYTHON2),$(call get-executable,python))
>> 
>> And then it'll set PYTHON to python2, no?
>> 
>
> No, get-executable-or-default only returns anything if it is an actual executable
> (asserted by a 'command -v' and 'test -f $ -a -x $'). At least this is how I understand
> the Makefile code. I also tested it with a Python 2.6.9 (no python2 in path) and it worked
> (after fixing some totally unrelated issues in python headers). It will however complain
> that "The path 'python2' is not executable." before using python.

Yeah, that's annoying.


>
>> 
>>>    override PYTHON_CONFIG := \
>>>      $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON)-config)
>> 
>> 
>> I'm thinking about something like below.. but sadly it doesn't work for
>> me.. hmm.
>
> Actually this appears to work for me (with 2.6.9 & 2.7.6) and I find this solution more
> elegant.

Thanks for testing.  It was my fault on setting symlink to a
non-existing file for testing.  It now works well for me too.

Can I add your Tested-by then?

Thanks,
Namhyung
--
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