Gnat-gps trouble on start

Bug #267302 reported by joesmoe10
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnat-gps (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gnat-gps

I'm using Ubuntu 8.10
when I open gnat-gps I see these errors:

It has trouble with the changelog.xml.
It finds two instances of gnatpsta.py and methods.py in /usr/share/gps/library and /usr/share/gps/plug-ins/

[2008-09-06 20:49:04] Error while parsing /usr/share/gps/plug-ins/changelog.xml
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/share/gps/plug-ins/ada_support.py", line 11, in <module>
    import os_utils, gnat_switches
ImportError: No module named gnat_switches
[2008-09-06 20:49:04] There are several startup scripts with the same name: gnatpsta.py
Not loading: /usr/share/gps/library/gnatpsta.py
[2008-09-06 20:49:04] There are several startup scripts with the same name: methods.py
Not loading: /usr/share/gps/library/methods.py
Welcome to GPS Version: 4.3~2008.08.09ubuntu1.Version: 4.3~2008.08.09ubuntu1.Version: 4.3~2008.08.09ubuntu1 (Debian) hosted on i486-linux-gnu
the GNAT Programming Studio
(c) 2001-2008 AdaCore

Tags: patch
Revision history for this message
John Raymond Dore (johnrdore) wrote :

I have reproduced a similar bug on 10.04 (Lucid Lynx).

The problems with "gnatpsta.py" and "methods.py", as mentioned in the original bug report from 2008, appear to have been fixed.

However, after downloading the "gnat-gps" package and starting GPS (/usr/bin/gnat-gps), I still get the following error message:

[2010-07-20 19:04:01] Error while parsing /usr/share/gps/plug-ins/changelog.xml
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/share/gps/plug-ins/ada_support.py", line 15, in <module>
    import os_utils, gnat_switches
ImportError: No module named gnat_switches
Welcome to GPS 4.3-5ubuntu1 (Debian) hosted on x86_64-linux-gnu
the GNAT Programming Studio
(c) 2001-2008 AdaCore

This error has not (so far) prevented me from building and running Ada programs in GPS, but its presence is not comforting and I'm wondering whether it will cause any future problems. :)

The Python ImportError can be made to go away by adding "gnat_switches.py" to /usr/share/gps/plug-ins/

I attach the missing gnat_switches.py file to this post. It is taken from AdaCore's GNAT_GPL package, available from:
http://libre.adacore.com/libre/download/

I am not sure how to resolve the "Error while parsing /usr/share/gps/plug-ins/changelog.xml" message, or even what the cause of the parse error is.

Revision history for this message
Riccardo Bernardini (framefritti) wrote :

I notice that this thread is a bit old, but since I tripped over the same bug (GPS 4.3-5ubuntu1 (Debian) hosted on i486-linux-gnu GNAT GPL 2009 (20090519)) and resolved the parsing error problem, I thought to post my solution here.

I resolved the error about gnat_switches by copying it in /usr/share/gps/plug-ins/, as suggested by Dore. About the cause of the parsing error in changelog.xml it seems to be the "<" and ">" in the line

          date user_name <user_name@>

inside the comment. I removed the "<" and ">" and the error disappeared. (Is an XML document with naked "<" and ">" in a comment valid? In other words, is this a bug of the XML file or a bug of the parser?)

tags: added: patch
Revision history for this message
Matthias Klose (doko) wrote :

this seems to be obsolete in 14.10.

Changed in gnat-gps (Ubuntu):
status: New → Fix Released
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.