umit higwidgets conflits

Bug #264750 reported by kop
4
Affects Status Importance Assigned to Milestone
umit (Ubuntu)
Fix Released
Undecided
kop

Bug Description

Binary package hint: umit

The attachment patch fixed conflicts with other higwidgets installed in python path.

Sample: if you install zenmap, Umit didn't run. Now fixed.

Related branches

Revision history for this message
kop (luis-kop) wrote :
Revision history for this message
kop (luis-kop) wrote :
Revision history for this message
kop (luis-kop) wrote :
Revision history for this message
James Westby (james-w) wrote :

Hi,

Thanks for the patch. I have a few comments.

First of all your changelog entry isn't very clear. You add two patches
and edit two more, but only mention two patches. Every change
should be documented clearly. Please explain for each what the
problem is you are fixing, and what the fix is.

As for the patches themselves,

-+ import gksu2
-+ gksu2.sudo('umit')
-+
++ try:
++ import gksu2
++ gksu2.sudo('umit')
++ except:
++ pass

it's not a good idea to have a bare "except:" clause, for instance CTRL-C
in that time will not do what it is supposed to. What is the problem
you are trying to catch, if it is one exception, e.g. ImportError then catch
it directly.

+-
+- ucontent.insert(uline, "sys.path.append('%s')\n" % modules)
 + modules = "/usr/share/umit"
++ ucontent.insert(uline, "sys.path = ['%s'] + sys.path\n" % modules)

I think that's the path conflict fix, is that correct? Inserting modules at the
start of the path is usually frowned upon, as it overrides other installed
copies, and restricts the user's flexibility. Is it necessary here? Also
"sys.path.insert(0, %s) " % modules might be a clearer way to write that.

Why the addition of writing to a file at the end?

These fixes look important, but I would have to understand them better before
I would be willing to upload. Links to where they are reported/fixed upstream
would be very valuable.

I'm un-subscribing the sponsors for now. Please re-subscribe them when ready.
I'll remain subscribed in case you have any questions.

Thanks,

James

Changed in umit:
assignee: nobody → luis-kop
status: New → Incomplete
Revision history for this message
kop (luis-kop) wrote :

Hi James,

Well I fixed what you request.

Following our conversations on IRC here is the new debdiff file.

Thanks for the help.

Revision history for this message
James Westby (james-w) wrote :

Hi kop,

Thanks for your work, it looks good. I have an upload on my disk
ready to sponsor now. However, I am going to delay again sorry.

Looking at http://trac.umitproject.org/changeset/3742 and comparing
it to your patch, there is a slight difference. Upstream has

+ ucontent.insert(uline, "sys.path.insert(0,('%s')\n " % modules )

you have

+ ucontent.insert(uline, "sys.path.insert(0, '/usr/share/umit')\n")

taking the bit I am worried about it is

insert(0,('%s')

vs.

insert(0, '/usr/share/umit')

or rather, ignoring the different way of specifying the path:

insert(0,('%s')

and

insert(0, '%s')

so the upstream one has an extra open bracket. I think yours
is correct, and that upstream's will lead to a syntax error. However,
I'm not 100% sure, and I don't want to upload something broken,
so I'd like you to point this out to upstream and see if you are correct.

If they fix their version then I will upload, if not then I will tweak your
patch.

Thanks,

James

James Westby (james-w)
Changed in umit:
status: Incomplete → Fix Committed
Revision history for this message
James Westby (james-w) wrote :

Hi,

Here's the changelog that I went with in the end, I hope
it is ok for you:

diff -u umit-0.9.5/debian/changelog umit-0.9.5/debian/changelog
--- umit-0.9.5/debian/changelog
+++ umit-0.9.5/debian/changelog
@@ -1,3 +1,20 @@
+umit (0.9.5-0ubuntu2) intrepid; urgency=low
+
+ * debian/patches/bugregister.patch: When an automatic bug report was filed
+ in trac the developers were not able to close it. This is fixed by
+ setting the bug to new when it is filed.
+ - http://trac.umitproject.org/ticket/44
+ - debian/patches/setup.patch: Put the modules dir at the start of
+ sys.path so that it is not overriden by other things in the path
+ (LP: #264750)
+ - http://trac.umitproject.org/changeset/3742
+ * debian/patches/root.patch: Catch gobject.GError to prevent cancelling
+ gksu causing a traceback, and hence a bug to be filed automatically.
+ - fixed extraports warning: Scans made with extraports used was crashing
+ with a traceback (http://trac.umitproject.org/changeset/3628).
+
+ -- Luis A. Bastiao Silva <email address hidden> Thu, 04 Sep 2008 16:18:23 +0100
+

Thanks,

James

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package umit - 0.9.5-0ubuntu2

---------------
umit (0.9.5-0ubuntu2) intrepid; urgency=low

    * debian/patches/bugregister.patch: When an automatic bug report was filed
      in trac the developers were not able to close it. This is fixed by
      setting the bug to new when it is filed.
       - http://trac.umitproject.org/ticket/44
    - debian/patches/setup.patch: Put the modules dir at the start of
      sys.path so that it is not overriden by other things in the path
      (LP: #264750)
       - http://trac.umitproject.org/changeset/3742
    * debian/patches/root.patch: Catch gobject.GError to prevent cancelling
      gksu causing a traceback, and hence a bug to be filed automatically.
    - fixed extraports warning: Scans made with extraports used was crashing
      with a traceback (http://trac.umitproject.org/changeset/3628).

 -- <email address hidden> (Luis A. Bastiao Silva) Thu, 04 Sep 2008 16:18:23 +0100

Changed in umit:
status: Fix Committed → 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.