[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#690060: RFS: glade2script/3.0.5-1 [ITP] -- Glade interface engine for scripts



(I don't intend to sponsor this package.)

http://mentors.debian.net/debian/pool/main/g/glade2script/glade2script_3.0.5-1.dsc

Build-dependency on python-all should be bumped to ">= 2.6.6-3~" (see dh_python2 manpage).

Current standard version is 3.9.4. (But note that lintian isn't aware of it yet, so you'll get a spurious newer-standards-version, which you should ignore for the time being.) You might want also update copyright format URL.

glade2script is missing dependency on python-gi. There might be other dependencies/recommendations missing, please check it yourself.

Let's have a look at the description:

Glade2script allows a script (Bash, Python or other) to display and interact with a GUI (created with Glade).

After reading this I still have no idea what this package does. "Allows" - but how?

Most of the opportunities offered by Gtk are available.

I don't think "opportunities" is the noun you are looking for. Perhaps "features"?

One can also embed an external application that supports it natively, like mplayer or gvim.

"It" being what?

A plugin system was added to extend G2S capability.

What is G2S?

Documentation, many examples, and an interface giving access to the archive supports (simply install and run glade2script-doc).

I don't see any of these in the package.

Glade2script is already used by several software, such as Boot-Repair, OS-Uninstaller, Debeditor, DeskWall, GUnity, LaunchBash, Malokal, mkv_extractor_gui, Screencastor, Sylaba2, Xee, Zenitor.

This does not belong in the package description.

2 versions are available: Gtk2 and Gtk3.

s/2/Two/

The comment about "Sample debian/rules" doesn't make sense. Please remove it. Ditto for the "some magic below" comment.

/usr/share/apport/package-hooks/*.py should be byte-compiled.

When I run glade2script without parameters, it fails with:
| $ glade2script
| ERROR:root:Could not find any typelib for Notify
| ERROR:root:Could not find any typelib for AppIndicator3
| Traceback (most recent call last):
|   File "/usr/bin/glade2script", line 4809, in <module>
|     path_appli, appli_name = os.path.split( f_glade )
| NameError: name 'f_glade' is not defined

According to the manpage, -g is not obligatory. (Which is likely a bug in the manpage.) Also, I would expect a nicer error message.

Next, I tried to test the script on a trivial glade file (see the attachment), but it didn't work:
| $ glade2script -g test.glade
| ERROR:root:Could not find any typelib for Notify
| ERROR:root:Could not find any typelib for AppIndicator3
| Traceback (most recent call last):
|   File "/usr/bin/glade2script", line 4811, in <module>
|     os.chdir(path_appli)
| OSError: [Errno 2] No such file or directory: ''

It turns out that you need to pass full path (which is both surprising and undocumented). And even then, it doesn't seem to work:
| $ glade2script -g $PWD/test.glade
| ERROR:root:Could not find any typelib for Notify
| ERROR:root:Could not find any typelib for AppIndicator3
| Exception in thread Thread-1:
| Traceback (most recent call last):
|   File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
|     self.run()
|   File "/usr/bin/glade2script", line 4450, in run
|     args = self.test_fichier( s_bash )
|   File "/usr/bin/glade2script", line 4437, in test_fichier
|     fichier_t = '''%s %s''' % ( fichier_t, l_file_splitted.pop(0) )
| IndexError: pop from empty list

Am I doing something wrong?

Now let's have a look at upstream source:

| One file for the entire source code is a choice
|  for easy integration into bash applications.

Also for making my head hurt! :>

| try:
|     getattr(self, 'load_%s' % section)()
| except:
|     function, widget = section.split(':')
|     getattr(self, 'load_%s' % function)(widget)

The above would catch, among others, KeybordInterrupt. You should only catch exceptions you _expect_ to be raised. (There are multiple instances of such smelly code.)

There are many eval() and exec() calls. Is that really necessary?

This:

| self.path_FIFO = '/tmp/FIFO%s' % (PID)

and this:

| if dossier == 'None':
|     dossier = '/tmp/webcache'

and this:

| if dossier == 'None': dossier = '/tmp/webcache'

smell like a security hole.

This:

| except ValueError, NameError:

won't catch NameError. It should be:

| except (ValueError, NameError):

instead. (Though I wonder why would anyone want to catch NameError.)

--
Jakub Wilk
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <!-- interface-requires gtk+ 3.0 -->
  <object class="GtkWindow" id="window1">
    <property name="can_focus">False</property>
    <child>
      <object class="GtkButton" id="button1">
        <property name="label" translatable="yes">button</property>
        <property name="use_action_appearance">False</property>
        <property name="visible">True</property>
        <property name="can_focus">True</property>
        <property name="receives_default">True</property>
        <property name="use_action_appearance">False</property>
      </object>
    </child>
  </object>
</interface>

Reply to: