Missing dependency on python-central

Bug #898401 reported by Dominic Lemire
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mic2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

On Ubuntu 11.10, mic2 is missing a dependency on the python-central package. In particular, pycentral is required for the function check_mic(bootstrap) in /usr/share/pyshared/mic/utils/bootstrap.py

This is an example of the error message you would get if python-central is not installed:
--- Start of error message ---
Traceback (most recent call last):
  File "/usr/bin/mic-image-creator", line 1014, in <module>
    ret = main()
  File "/usr/bin/mic-image-creator", line 800, in main
    utils.bootstrap.check_mic(options.bootstrap)
  File "/usr/lib/pymodules/python2.7/mic/utils/bootstrap.py", line 692, in check_mic
    stdout = subprocess.PIPE, stderr = dev_null)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1239, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
--- End of error message ---

After this is resolved, someone also needs to apply the following patch to that function:

--- /usr/share/pyshared/mic/utils/bootstrap.py
+++ /usr/share/pyshared/mic/utils/bootstrap.py
@@ -696,7 +696,6 @@
                 raise BootstrapError("Failed to run /usr/bin/pycentral")
             pycentraldir = output.split()[0]
             pythonlib = pycentraldir
- bin_path = "/usr/local/bin"
         elif dist == 'debian':
             if os.path.exists("/usr/share/python-support/mic2"):
                 pythonlib = "/usr/share/python-support/mic2"

Otherwise, you get the following error message:
--- Start of error message ---
Traceback (most recent call last):
  File "/usr/bin/mic-image-creator", line 1014, in <module>
    ret = main()
  File "/usr/bin/mic-image-creator", line 800, in main
    utils.bootstrap.check_mic(options.bootstrap)
  File "/usr/lib/pymodules/python2.7/mic/utils/bootstrap.py", line 705, in check_mic
    copy_mic2(bootstrap, bin_path = bin_path, python_lib_path = pythonlib)
  File "/usr/lib/pymodules/python2.7/mic/utils/bootstrap.py", line 681, in copy_mic2
    shutil.copy(bin_path + "/mic", bootstrap + "/usr/bin/mic")
  File "/usr/lib/python2.7/shutil.py", line 116, in copy
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 81, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/usr/local/bin/mic'
--- End of error message ---

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.