Subject: Re: [devuan-dev] bug#528: python3-reportbug: fails to install due to syntax error

From: [email-masked]
Date: Sun, 6 Dec 2020 07:39:57 +1100

> On 6 Dec 2020, at 04:02, Mark Hindley <[email-masked]> wrote:
> 
> Gerard,
> 
>> On Sat, Dec 05, 2020 at 02:34:21PM +0100, Gerard H. Pille wrote:
>> Mark Hindley wrote:
>>> Does /usr/bin/python exist? Which package does it belong to? Is it a symlink,
>>> and if so, what to?
>> ghp-amdphIIx4a:/root
>> # ls -al /usr/bin/python
>> lrwxrwxrwx 1 root root 9 24 jan  2017 /usr/bin/python -> python2.7
>> According to the date, this is not my doing.  System was installed a year
>> ago on a disk that hadn't seen Linux before.
> 
> Does it belong to any installed package? 'dpkg -S /usr/bin/python' should tell
> you.
> 
> Even with a /usr/bin/python -> python2 symlink I am unable to get the postinst
> to fail as it does in your case. Somehow you appear to have a python2 interpreter
> which is trying to compile python3 code. I can't see how that could happen.
> 
> Can you check your python3 versions? I get:
> 
> $ python3 -V
> Python 3.9.1rc1
> 
> Any extraneous symlinks in /usr/local/bin or elsewhere in the $PATH?
> 
> Thanks.
> 
> Mark

Mark,

Another possibility is that f-strings weren’t introduced to python until version 3.6 while ascii only has version 3.5. Maybe python3-reportbug is trying to run a script somewhere before the system has upgraded the python3 interpreter?

I also noticed that the python3-reportbug package in chimaera doesn’t have a version restriction for >python3.6 so it’s possible to upgrade that package without upgrading the main python3 package which could lead to this problem.

Tom