[Bug 1754311] Re: package python-twisted-core 16.0.0-1 failed to install/upgrade: subprocess new pre-removal script returned error exit status 1

DLPaktor David at Paktor.biz
Thu Mar 8 23:48:44 UTC 2018


Thank you. You raise a good point: It's not a bug. The functionality is 
restored by reverting the   python  sym-link to its previous state, 
i.e., pointing at  python2 , as per the comments and advice from 
Leonidas S. Barbosa

My only remaining (minor) complaint is that I can no longer develop 
Python code using the command  python  to reference the latest version; 
I have to specify the version in the invocation.

Generally speaking, I believe that if an application — especially a 
critical system utility — depends on a particular version of a 
general-use program that is known to be evolving and liable to change, 
then that dependency is better kept encapsulated to that application. 
The default version of such a general-use program should be allowed to 
"float" and keep up with new developments, without risking damage to the 
system by doing so.

In particular, if the Updater depends on  python2 , but invokes it as  
python , then this puts unnecessary and possibly harmful constraints on 
the entire system: For instance, suppose another application or utility 
comes along that depends on  python3  but invokes it as  python  on the 
assumption that  python  is linked to python3 ; the resulting conflict 
will be difficult to resolve. This is not an unlikely scenario.

I think an argument can be made that the fact that the Updater and the 
other utilities involved carry the assumption that python  will always 
be linked to  python2  does constitute a bug of sorts. This bug would be 
fairly easy to resolve, by changing its invocation(s) of  python  to 
explicitly specify  python2 and not depending on the system's default to 
be frozen, especially to an obsolescent version.

I think it should be filed as a bug, but I don't believe I have 
sufficient visibility into the internals of the utilities involved to 
have authority to do so.

In the meantime, for my own purposes, I am going to create a link to 
always-the-latest version of  python  and call it "rutnoy". Perhaps you 
can guess why... ;-}

Regards,


------------------------------------------------------------------------

    On 03/08/2018 12:12 PM, Dmitry Shachnev wrote:
>     If you change important system paths (like /usr/bin/python), then you
>     should be aware that this can cause damage on your system. This is not a
>     bug.
>
>     ** Changed in: twisted (Ubuntu)
>             Status: New => Invalid
>
------------------------------------------------------------------------

--

David

David at Paktor.biz <mailto:David at Paktor.biz>

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

Title:
  package python-twisted-core 16.0.0-1 failed to install/upgrade:
  subprocess new pre-removal script returned error exit status 1

Status in twisted package in Ubuntu:
  Invalid

Bug description:
  I installed python 3.6.4.

  Now when I run Software Updater, or  apt-get -f install  from the command-line,
  they crash.

  Software Updater puts up a message that:

  The package system is broken
  Check if you are using third party repositories. If so disable them, since they are a common source of problems.
  Furthermore run the following command in a Terminal: apt-get install -f

  
  Running  apt-get install -f  produced a cascade with the following highlight:

  Preparing to unpack .../python-twisted-core_16.0.0-1ubuntu0.2_all.deb ...
    File "/usr/bin/pyclean", line 63
      except (IOError, OSError), e:
                               ^
  SyntaxError: invalid syntax


  So I changed   File "/usr/bin/pyclean", line 63 to
      except (IOError, OSError) as e:

  
  The run of  apt-get install -f  now got:

  Preparing to unpack .../python-twisted-core_16.0.0-1ubuntu0.2_all.deb ...
  Traceback (most recent call last):
    File "/usr/bin/pyclean", line 32, in <module>
      from debpython.namespace import add_namespace_files
    File "/usr/share/python/debpython/namespace.py", line 120
      except (IOError, OSError), e:
                               ^

  
  I checked and, yes, File "/usr/share/python/debpython/namespace.py", line 120 has the same phrase.

  
  Breaking the update system prevents security updates from going through, so I am going to check the "security vulnerability" box as well.

  ProblemType: Package
  DistroRelease: Ubuntu 16.04
  Package: python-twisted-core 16.0.0-1
  ProcVersionSignature: Ubuntu 4.4.0-112.135-generic 4.4.98
  Uname: Linux 4.4.0-112-generic x86_64
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  Date: Thu Mar  8 01:37:43 2018
  ErrorMessage: subprocess new pre-removal script returned error exit status 1
  PackageArchitecture: all
  RelatedPackageVersions:
   dpkg 1.18.4ubuntu1.1
   apt  1.2.15ubuntu0.2
  SourcePackage: twisted
  Title: package python-twisted-core 16.0.0-1 failed to install/upgrade: subprocess new 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/twisted/+bug/1754311/+subscriptions



More information about the foundations-bugs mailing list