package python-six 1.10.0-3 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 1

Bug #1715062 reported by Success on 2017-09-05
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-defaults (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Unassigned
Zesty
Undecided
Unassigned

Bug Description

SRU: Replacing the shebang from python to python2 should not have regression potential. The python2 symlink is available in xenial, and earlier releases (trusty, wily), so there shouldn't be any upgrade issues.

kflkt

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: python-six 1.10.0-3
ProcVersionSignature: Ubuntu 4.10.0-33.37~16.04.1-generic 4.10.17
Uname: Linux 4.10.0-33-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
Date: Tue Sep 5 06:44:23 2017
Dependencies:

ErrorMessage: subprocess installed pre-removal script returned error exit status 1
InstallationDate: Installed on 2017-08-03 (32 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
PackageArchitecture: all
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.19
SourcePackage: six
Title: package python-six 1.10.0-3 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Success (dmoxy) wrote :
tags: removed: need-duplicate-check
Joshua Powers (powersj) wrote :

From log:

Removing python-pip (8.1.1-2ubuntu0.4) ...
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax

Removing python-pkg-resources (20.7.0-1) ...
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax

Removing python-six (1.10.0-3) ...
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax

Joshua Powers (powersj) wrote :

Thank you for taking the time to file a bug report.

Per the log message above, you may have changed the default Python
version from 2 to 3. This leads to unexpected behavior like the errors
you are currently seeing. Can you confirm that /usr/bin/python is
version 2?

Since it seems likely to me that this is a local configuration problem,
rather than a bug in Ubuntu, I am marking this bug as 'Incomplete'.

However, if you believe that this is really a bug in Ubuntu, then we would
be grateful if you would provide a more complete description of the problem
with steps to reproduce, explain why you believe this is a bug in Ubuntu
rather than a problem specific to your system, and then change the bug
status back to "New".

For local configuration issues, you can find assistance here:
http://www.ubuntu.com/support/community

Changed in six (Ubuntu):
status: New → Incomplete

yeah, you are correct i upgraded from python 2 to 3

On 9/6/17, Joshua Powers <email address hidden> wrote:
> Thank you for taking the time to file a bug report.
>
> Per the log message above, you may have changed the default Python
> version from 2 to 3. This leads to unexpected behavior like the errors
> you are currently seeing. Can you confirm that /usr/bin/python is
> version 2?
>
> Since it seems likely to me that this is a local configuration problem,
> rather than a bug in Ubuntu, I am marking this bug as 'Incomplete'.
>
> However, if you believe that this is really a bug in Ubuntu, then we would
> be grateful if you would provide a more complete description of the problem
> with steps to reproduce, explain why you believe this is a bug in Ubuntu
> rather than a problem specific to your system, and then change the bug
> status back to "New".
>
> For local configuration issues, you can find assistance here:
> http://www.ubuntu.com/support/community
>
> ** Changed in: six (Ubuntu)
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1715062
>
> Title:
> package python-six 1.10.0-3 failed to install/upgrade: subprocess
> installed pre-removal script returned error exit status 1
>
> Status in six package in Ubuntu:
> Incomplete
>
> Bug description:
> kflkt
>
> ProblemType: Package
> DistroRelease: Ubuntu 16.04
> Package: python-six 1.10.0-3
> ProcVersionSignature: Ubuntu 4.10.0-33.37~16.04.1-generic 4.10.17
> Uname: Linux 4.10.0-33-generic x86_64
> ApportVersion: 2.20.1-0ubuntu2.10
> Architecture: amd64
> Date: Tue Sep 5 06:44:23 2017
> Dependencies:
>
> ErrorMessage: subprocess installed pre-removal script returned error exit
> status 1
> InstallationDate: Installed on 2017-08-03 (32 days ago)
> InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64
> (20170215.2)
> PackageArchitecture: all
> RelatedPackageVersions:
> dpkg 1.18.4ubuntu1.1
> apt 1.2.19
> SourcePackage: six
> Title: package python-six 1.10.0-3 failed to install/upgrade: subprocess
> installed pre-removal script returned error exit status 1
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/six/+bug/1715062/+subscriptions
>

Colin Watson (cjwatson) wrote :

I'm afraid we don't support running with /usr/bin/python pointing to Python 3. For Python 3 you should use /usr/bin/python3.

I'm reassigning this to python-defaults just because it might be a good idea for /usr/bin/pycompile, /usr/bin/pyclean, and the other scripts shipped by python-minimal to explicitly use /usr/bin/python2 rather than /usr/bin/python, to defend against this kind of thing. It wouldn't make it OK to change /usr/bin/python to be Python 3 on Ubuntu, and you'd probably still run into some other problem later, but it might still be a sensible thing to do in terms of defensive programming.

affects: six (Ubuntu) → python-defaults (Ubuntu)
Changed in python-defaults (Ubuntu):
status: Incomplete → New
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-defaults - 2.7.14-2ubuntu1

---------------
python-defaults (2.7.14-2ubuntu1) artful; urgency=medium

  * pycompile, pyclean, pyversions: Use python2 as the shebang to guard
    against people fiddling around with the python symlink or having a
    python3 installed as python in /usr/local. LP: #1715062.
  * Rename the idle package to idle2. idle is now built for python3.

 -- Matthias Klose <email address hidden> Sat, 23 Sep 2017 10:18:14 +0200

Changed in python-defaults (Ubuntu):
status: New → Fix Released
Matthias Klose (doko) on 2017-11-23
description: updated

Hello Success, or anyone else affected,

Accepted python-defaults into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python-defaults/2.7.12-1~16.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in python-defaults (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed verification-needed-xenial
Matthias Klose (doko) wrote :

the xenial uploads work as expected, and are using python2 as the shebang

tags: added: verification-done-xenial
removed: verification-needed-xenial
tags: added: verification-done
removed: verification-needed
Łukasz Zemczak (sil2100) wrote :

Hello Success, or anyone else affected,

Accepted python-defaults into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python-defaults/2.7.13-2ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in python-defaults (Ubuntu Zesty):
status: New → Fix Committed
tags: added: verification-needed verification-needed-zesty
removed: verification-done
Matthias Klose (doko) wrote :

the zesty upload works as expected, and is using python2 as the shebang

tags: added: verification-done verification-done-zesty
removed: verification-needed verification-needed-zesty
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers