Devuan bug report logs - #528
python3-reportbug: fails to install due to syntax error

Packages: 7.8.0+devuan1, python3-reportbug, version:, severity:, grave; Maintainer for 7.8.0+devuan1 is (unknown); Maintainer for python3-reportbug is Mark Hindley <mark@hindley.org.uk>; Source for python3-reportbug is src:reportbug. Maintainer for version: is (unknown); Maintainer for severity: is (unknown); Maintainer for grave is (unknown);

Reported by: "Gerard H. Pille" <ghpille@hotmail.com>

Date: Fri, 4 Dec 2020 23:18:02 UTC

Severity: normal

Tags: invalid, moreinfo

Done: Mark Hindley <mark@hindley.org.uk>

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to devuan-bugs@lists.dyne.org, Mark Hindley <mark@hindley.org.uk>, devuan-dev@lists.dyne.org:
bug#528; Package python3-reportbug version: 7.8.0+devuan1 severity: grave. (Fri, 04 Dec 2020 23:18:02 GMT) (full text, mbox, link).


Acknowledgement sent to "Gerard H. Pille" <ghpille@hotmail.com>:
New bug report received and forwarded. Copy sent to Mark Hindley <mark@hindley.org.uk>, devuan-dev@lists.dyne.org. (Fri, 04 Dec 2020 23:18:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.devuan.org (full text, mbox, reply):

From: "Gerard H. Pille" <ghpille@hotmail.com>
To: Devuan Bug Tracking System <submit@bugs.devuan.org>
Subject: python3-reportbug: fails to install due to syntax error
Date: Sat, 5 Dec 2020 00:03:34 +0100
Package: python3-reportbug Version: 7.8.0+devuan1 Severity: grave
Justification: renders package unusable

Dear Maintainer,

*** Reporter, please consider answering these questions, where
appropriate ***

   * What led up to the situation?
upgrade from ascii to chimaera (not dist-upgrade)
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
this package failed to upgrade
# dpkg -i python3-reportbug_7.8.0+devuan1_all.deb
(Reading database ... 119108 files and directories currently installed.)
Preparing to unpack python3-reportbug_7.8.0+devuan1_all.deb ...
Unpacking python3-reportbug (7.8.0+devuan1) over (7.8.0+devuan1) ...
Setting up python3-reportbug (7.8.0+devuan1) ...
  File "/usr/lib/python3/dist-packages/reportbug/utils.py", line 1214
    init += f', PID 1: {pf.read().strip()}'
                                          ^
SyntaxError: invalid syntax

dpkg: error processing package python3-reportbug (--install):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 python3-reportbug

   * What outcome did you expect instead?

-- System Information: Distributor ID:  Devuan Description:     Devuan
GNU/Linux 4.0.0 (n/a) Release:  4.0.0 Codename: n/a Architecture: x86_64

Kernel: Linux 4.9.0-11-amd64 (SMP w/4 CPU threads) Kernel taint flags:
TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE Locale: LANG=C, LC_CTYPE=C
(charmap=ANSI_X3.4-1968), LANGUAGE=nl_BE:nl Shell: /bin/sh linked to
/bin/dash Init: sysvinit (via /sbin/init)

Versions of packages python3-reportbug depends on: ii apt 2.1.11+devuan1
ii file 1:5.38-5 ii python3 3.5.3-1 ii python3-apt 1.4.1 ii
python3-debian 0.1.38 ii python3-debianbts 3.0.2 ii python3-requests
2.12.4-1 ii sensible-utils 0.0.12+nmu1

python3-reportbug recommends no packages.

Versions of packages python3-reportbug suggests: ii reportbug
7.8.0+devuan1

-- no debconf information




Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#528; Package python3-reportbug version: 7.8.0+devuan1 severity: grave. (Sat, 05 Dec 2020 10:33:02 GMT) (full text, mbox, link).


Message #8 received at 528@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: "Gerard H. Pille" <ghpille@hotmail.com>, 528@bugs.devuan.org
Subject: Re: bug#528: python3-reportbug: fails to install due to syntax error
Date: Sat, 5 Dec 2020 10:28:08 +0000
Control: tags -1 moreinfo

Gerard,

Thanks for this. However, can't yet reproduce it.

On Sat, Dec 05, 2020 at 12:03:34AM +0100, Gerard H. Pille wrote:
> Setting up python3-reportbug (7.8.0+devuan1) ...
>   File "/usr/lib/python3/dist-packages/reportbug/utils.py", line 1214
>     init += f', PID 1: {pf.read().strip()}'
>                                           ^
> SyntaxError: invalid syntax

Strange. This seems to imply that the python interpreter doesn understand the
f-string.  Presumably it is running under python2? What python2 pacakges do you
have installed?

 dpkg -l | grep python2 should producs a list.

Thanks

Mark

Added tag(s) moreinfo. Request was from Mark Hindley <mark@hindley.org.uk> to 528-submit@bugs.devuan.org. (Sat, 05 Dec 2020 10:33:04 GMT) (full text, mbox, link).


Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#528; Package python3-reportbug version: 7.8.0+devuan1 severity: grave. (Sat, 05 Dec 2020 13:48:02 GMT) (full text, mbox, link).


Acknowledgement sent to Mark Hindley <mark@hindley.org.uk>:
Extra info received and forwarded to list. Copy sent to devuan-dev@lists.dyne.org. (Sat, 05 Dec 2020 13:48:04 GMT) (full text, mbox, link).


Message #15 received at 528@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: "Gerard H. Pille" <ghpille@hotmail.com>
Cc: 528@bugs.devuan.org
Subject: Re: bug#528: python3-reportbug: fails to install due to syntax error
Date: Sat, 5 Dec 2020 13:31:15 +0000
On Sat, Dec 05, 2020 at 11:48:42AM +0100, Gerard H. Pille wrote:
> ghp-amdphIIx4a:/root
> # dpkg -l | grep python2
> ii  libpython2.7-minimal:amd64             2.7.18-1      amd64
> Minimal subset of the Python language (version 2.7)
> ii  libpython2.7-stdlib:amd64              2.7.18-1      amd64
> Interactive high-level object-oriented language (standard library, version
> 2.7)
> ii  python2.7                              2.7.18-1      amd64
> Interactive high-level object-oriented language (version 2.7)
> ii  python2.7-minimal                      2.7.18-1      amd64
> Minimal subset of the Python language (version 2.7)
> 
> 
> But I have python3 installed too.  This is a backup system I rarely use, try
> to keep it as standard Devuan as possible.  On the systems I work on
> regularly, I make sure python3 is the default.

Does /usr/bin/python exist? Which package does it belong to? Is it a symlink,
and if so, what to?

> I didn't know about the "f-string".

No, neither did I until I looked at this!

Thanks

Mark

Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#528; Package python3-reportbug version: 7.8.0+devuan1 severity: grave. (Sat, 05 Dec 2020 17:03:01 GMT) (full text, mbox, link).


Acknowledgement sent to Mark Hindley <mark@hindley.org.uk>:
Extra info received and forwarded to list. Copy sent to devuan-dev@lists.dyne.org. (Sat, 05 Dec 2020 17:03:03 GMT) (full text, mbox, link).


Message #20 received at 528@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: "Gerard H. Pille" <ghpille@hotmail.com>
Cc: 528@bugs.devuan.org
Subject: Re: bug#528: python3-reportbug: fails to install due to syntax error
Date: Sat, 5 Dec 2020 16:41:53 +0000
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

Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#528; Package python3-reportbug version: 7.8.0+devuan1 severity: grave. (Sat, 05 Dec 2020 20:33:01 GMT) (full text, mbox, link).


Acknowledgement sent to Mark Hindley <mark@hindley.org.uk>:
Extra info received and forwarded to list. Copy sent to devuan-dev@lists.dyne.org. (Sat, 05 Dec 2020 20:33:04 GMT) (full text, mbox, link).


Message #25 received at 528@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: "Gerard H. Pille" <ghpille@hotmail.com>
Cc: 528@bugs.devuan.org
Subject: Re: bug#528: python3-reportbug: fails to install due to syntax error
Date: Sat, 5 Dec 2020 20:26:16 +0000
Control: tags -1 invalid
Control: close -1

On Sat, Dec 05, 2020 at 08:05:34PM +0100, Gerard H. Pille wrote:
> # dpkg -S $(which python)
> python-minimal: /usr/bin/python
> 
> # python3 -V
> Python 3.8.6
> 
> # python2 -V
> Python 2.7.18
> 
> # python -V
> Python 2.7.18
> 
> 

> Currently, an "apt-get reinstall python3-reportbug" succeeds.

Good!

> So, somewhere in the upgrade from ascii to chimaera, python3-reportbug was
> installed while python2 was still used.  Caused by skipping Beowulf?

Ah, yes. That is definitely *not* supported. You are not supposed to miss out a
release[1] for exactly this sort of reason. Python versions and packaging are
quite fragile and you can end up with mismatches. For example, python-minimal
doesn't exist in chimaera at all.

I can't reproduce your behaviour on a correctly installed ceres or chimaera
system, so I am going to tag it invalid an close.

Please feel free to reopen if you really think there is a reportbug issue.

Thanks

Mark

[1]  https://unix.stackexchange.com/questions/542459/upgrade-debian-jessie-8-to-buster-10-possible-or-need-to-go-sequential-in-ve


Added tag(s) invalid. Request was from Mark Hindley <mark@hindley.org.uk> to 528-submit@bugs.devuan.org. (Sat, 05 Dec 2020 20:33:06 GMT) (full text, mbox, link).


Marked bug as done Request was from Mark Hindley <mark@hindley.org.uk> to 528-submit@bugs.devuan.org. (Sat, 05 Dec 2020 20:33:06 GMT) (full text, mbox, link).


Notification sent to "Gerard H. Pille" <ghpille@hotmail.com>:
bug acknowledged by developer. (Sat, 05 Dec 2020 20:33:06 GMT) (full text, mbox, link).


Information forwarded to devuan-bugs@lists.dyne.org, Mark Hindley <mark@hindley.org.uk>, devuan-dev@lists.dyne.org:
bug#528; Package python3-reportbug version: 7.8.0+devuan1 severity: grave. (Sat, 05 Dec 2020 21:03:01 GMT) (full text, mbox, link).


Acknowledgement sent to wirelessduck@gmail.com:
Extra info received and forwarded to list. Copy sent to Mark Hindley <mark@hindley.org.uk>, devuan-dev@lists.dyne.org. (Sat, 05 Dec 2020 21:03:03 GMT) (full text, mbox, link).


Message #36 received at 528@bugs.devuan.org (full text, mbox, reply):

From: wirelessduck@gmail.com
To: Mark Hindley <mark@hindley.org.uk>
Cc: "Gerard H. Pille" <ghpille@hotmail.com>, 528@bugs.devuan.org
Subject: Re: [devuan-dev] bug#528: python3-reportbug: fails to install due to syntax error
Date: Sun, 6 Dec 2020 07:39:57 +1100

> On 6 Dec 2020, at 04:02, Mark Hindley <mark@hindley.org.uk> 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

Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Mon Nov 25 02:32:51 2024;