can`t set-up or uninstall scons

Bug #80298 reported by Jonáš Svatoš
4
Affects Status Importance Assigned to Milestone
python-central (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: scons

During install, remove, reinstall process :

 sudo apt-get install scons
Reading package lists... Done
Building dependency tree
Reading state information... Done
scons is already the newest version.
The following packages were automatically installed and are no longer required:
  libnl1-pre6 libnm-util0 dhcdbd
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
1 not fully installed or removed.
Need to get 0B/389kB of archives.
After unpacking 0B of additional disk space will be used.
(Reading database ... 97339 files and directories currently installed.)
Preparing to replace scons 0.96.93-2 (using .../scons_0.96.93-2_all.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1373, in <module>
    main()
  File "/usr/bin/pycentral", line 1367, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 952, in run
    pkg.remove(runtimes, remove_script_files=True)
  File "/usr/bin/pycentral", line 697, in remove
    default_runtime.remove_byte_code(self.private_files)
AttributeError: 'NoneType' object has no attribute 'remove_byte_code'
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1373, in <module>
    main()
  File "/usr/bin/pycentral", line 1367, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 952, in run
    pkg.remove(runtimes, remove_script_files=True)
  File "/usr/bin/pycentral", line 697, in remove
    default_runtime.remove_byte_code(self.private_files)
AttributeError: 'NoneType' object has no attribute 'remove_byte_code'
dpkg: error processing /var/cache/apt/archives/scons_0.96.93-2_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1373, in <module>
    main()
  File "/usr/bin/pycentral", line 1367, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 889, in run
    self.options.exclude, byte_compile_default=True)
  File "/usr/bin/pycentral", line 672, in install
    self.default_runtime.byte_compile(self.private_files,
AttributeError: 'NoneType' object has no attribute 'byte_compile'
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/scons_0.96.93-2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

It`s very confusing because now i can`t install/remove/reinstall ANY packages, because dpkg always tries to resolve scons dependencies on the first place, ending with error all the time..

Jonáš Svatoš (lsde)
description: updated
Revision history for this message
Mark Brown (broonie) wrote :

This looks like a duplicate of 61470?

https://launchpad.net/ubuntu/+source/scons/+bug/61470

Whatever is going on appears to be in pycental..

Revision history for this message
Pawel Tomulik (ptomulik) wrote :

Hi, I had the same problem -- not only with 'scons', but with other packages related to python too
(e.g. blender). I found, that problem is probably in 'pyversions.py', which is a part of 'python-central' and 'python-minimal' on my Debian 'sid'. I did slight change in the 'default_version' function:

line ~ 120:

Instead of:
   link = _default_version = os.readlink('/usr/bin/python')

I put
   link = os.readlink('/usr/bin/python')
  _default_version = os.path.basename(link)

It seems to work, but I can't guarantee, that it doesn't cause any side-effect in python.

Revision history for this message
Mark Brown (broonie) wrote :

This appears to be a python-central issue rather than a SCons issue. I expect it's already fixed there but can't confirm that.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.