On 02/05/2018 12:47 PM, Guido Aulisi wrote:
2018-02-05 12:00 GMT+01:00 Petr Viktorin
<pviktori(a)redhat.com>:
> On 02/05/2018 09:32 AM, Guido Aulisi wrote:
>>
>> Hi,
>> according to latest python guides, we should avoid calling generic
>> unversioned python command
>>
>>
(
https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build#...)
>>
>> But what should we do if it's called inside waf? waf is provided
>> upstream, should we patch it to call either python2 or python3, or use
>> PYTHON_DISALLOW_AMBIGUOUS_VERSION=0?
>>
>> I got this problem in recent ardour5 rawhide builds
>> (
https://apps.fedoraproject.org/koschei/package/ardour5?collection=f28).
>> Now I'm seeing that builds are back to normal and python2 has been
>> downgraded.
>>
>> Thanks
>
>
> Thanks for the question, and sorry for the inconvenience!
>
> The python2 message is, so far, only a warning. I see the log contains a
> different error: "--freedesktop requires itstool > 2.0.0 to translate
> files.".
> Could you check if that's not causing the failure?
I found that the check for itstool fails because it gets the
deprecation warning as input, there's a mistake in
output = subprocess.Popen("itstool --version", shell=True,
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE).communicate()[0].splitlines()
stderr is redirected to stdout, so itstool gets DEPRECATION and
version [u'WARNING:']
I will report this upstream, it seems to me that the redirection of
stderr is a mistake.
Ah! I see the problem now: /usr/bin/itstool has a /usr/bin/python
shebang. I've filed a pull request that should fix this:
https://src.fedoraproject.org/rpms/itstool/pull-request/1
[...]
>
> It looks like waf will be one of the tougher things to figure out. After the
> mass rebuild we'll see the effect on the whole distribution, and hopefully
> come up with a better strategy for bundled waf.
I will file a bug for waf, if it's the correct thing to do.
If you can wait a bit until itstool maintainers merge the PR, that
should sort the problem out.
Let me know if you need this soon, I can look for a provenpackager.
--
Petr Viktorin