[Bug 797006] Re: software-center package update failure due to the use of update-alternatives

Daniel Hartwig 797006 at bugs.launchpad.net
Tue Mar 13 13:39:58 UTC 2012


> After using update-alternatives to switch between python versions
> recently, the update of software-center failed.

/usr/bin/python is not managed by alternatives.  This is a symlink which
belongs to the python-minimal package.

You have used alternatives and changed this file.  It is *not* supported
for a user to change any system-managed files (using alternatives or
otherwise).

What you have encountered is not a bug but a safety check against users
which have modified system files.


** Changed in: python-central (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-central in Ubuntu.
https://bugs.launchpad.net/bugs/797006

Title:
  software-center package update failure due to the use of update-
  alternatives

Status in “python-central” package in Ubuntu:
  Invalid

Bug description:
  Binary package hint: software-center

  After using update-alternatives to switch between python versions
  recently, the update of software-center failed. I do realize that it
  needs python 2.7 and switched python back to 2.7 using update-
  alternatives. It turns out that it's the link itself, which might be
  fixed in /usr/bin/pycentral.

  Result of running apt-get install -f, when it failed:

  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following package was automatically installed and is no longer required:
    chromium-browser-inspector
  Use 'apt-get autoremove' to remove them.
  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  1 not fully installed or removed.
  After this operation, 0 B of additional disk space will be used.
  Setting up software-center (4.0.3) ...
  Traceback (most recent call last):
    File "/usr/bin/pycentral", line 2327, in <module>
      main()
    File "/usr/bin/pycentral", line 2321, in main
      rv = action.run(global_options)
    File "/usr/bin/pycentral", line 1493, in run
      runtimes = get_installed_runtimes()
    File "/usr/bin/pycentral", line 278, in get_installed_runtimes
      default_version = pyversions.default_version(version_only=True)
    File "/usr/share/pycentral-data/pyversions.py", line 172, in default_version
      raise ValueError, "/usr/bin/python does not match the python default version. It must be reset to point to %s" % debian_default
  ValueError: /usr/bin/python does not match the python default version. It must be reset to point to python2.7
  dpkg: error processing software-center (--configure):
   subprocess installed post-installation script returned error exit status 1
  Errors were encountered while processing:
   software-center
  E: Sub-process /usr/bin/dpkg returned an error code (1)

  While at the same time, python -V gives the correct python 2.7.1+.

  ls /usr/bin/python* yields:
  /usr/bin/python  /usr/bin/python2.6  /usr/bin/python2.7  /usr/bin/python3  /usr/bin/python3.2  /usr/bin/python3.2mu
  and track the link down:
  /usr/bin/python -> /etc/alternatives/python*
  /etc/alternatives/python -> /usr/bin/python2.7*

  To confirm that it's the link caused software-center's update failure,
  I used update-alternatives --remove-all to remove the python link,
  recreated it to point directly to /usr/bin/python2.7, and the apt-get
  install proceeded fine.

  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following package was automatically installed and is no longer required:
    chromium-browser-inspector
  Use 'apt-get autoremove' to remove them.
  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  1 not fully installed or removed.
  After this operation, 0 B of additional disk space will be used.
  Setting up software-center (4.0.3) ...
  Updating software catalog...this may take a moment.
  Software catalog update was successful.
  Processing triggers for python-central ...

  My suggestion is to change the check in /usr/share/pycentral-
  data/pyversions.py to directly check the python version, instead of
  joining /usr/bin/python and version number.

  I am using the desktop Ubuntu 11.04 x64
  Linux *** 2.6.38-10-generic #44-Ubuntu SMP Thu Jun 2 21:32:22 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-central/+bug/797006/+subscriptions




More information about the foundations-bugs mailing list