Package: gdebi
Version: 0.9.5.7+nmu5

At build time it is getting stuck until a timeout kills it:

For example in Ubuntu here:
https://launchpadlibrarian.net/542966965/buildlog_ubuntu-impish-amd64.gdebi_0.9.5.7+nmu5_BUILDING.txt.gz

This isn't a problem yet as 2.68 is only in experimental for now.

Log:
```
running build_ext
test_simple (tests.test_gdebi_gtk.GDebiGtkTestCase) ...
WARNING:root:Error loading logo gtk-icon-theme-error-quark: Icon
'gnome-mime-application-x-deb' not present in theme Yaru (0)

(setup.py:7825): Gtk-WARNING **: 05:55:50.408: Error loading theme
icon 'dialog-error' for stock: Icon 'dialog-error' not present in
theme Yaru
E: Build killed with signal TERM after 150 minutes of inactivity
```

This is reproducible locally and the process tree looks like:

F   UID     PID    PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
4     0   39842       0  20   0   9328  3000 do_wai Ss   pts/2      0:00 bash
0     0   40835   39842  20   0  22136 13032 do_wai S+   pts/2
0:00  \_ /usr/bin/perl /usr/bin/debuild -i -us -uc -b
0     0   40852   40835  20   0   7392   604 pipe_w S+   pts/2
0:00      \_ tee ../gdebi_0.9.5.7+nmu5_amd64.build
0     0   40853   40835  20   0  25328 16328 do_wai S+   pts/2
0:00      \_ /usr/bin/perl /usr/bin/dpkg-buildpackage -us -uc -ui -i
-b
0     0   40891   40853  20   0   7764  1616 do_wai S+   pts/2
0:00          \_ /usr/bin/make -f debian/rules build
0     0   40892   40891  20   0  24356 15260 do_wai S+   pts/2
0:00              \_ /usr/bin/perl /usr/bin/dh build --with python3
--buildsystem pybuild
0     0   41533   40892  20   0   7764  1572 do_wai S+   pts/2
0:00                  \_ /usr/bin/make -f debian/rules
override_dh_auto_test
0     0   41535   41533  20   0   2620  1320 do_wai S+   pts/2
0:00                      \_ /bin/sh /usr/bin/xvfb-run -a python3.9
setup.py test
4     0   41545   41535  20   0 1034648 37536 ep_pol Sl+ pts/2
0:00                          \_ Xvfb :99 -screen 0 1280x1024x24
-nolisten tcp -auth /tmp/xvfb-run.RlZdX8/Xauthority
0     0   41560   41535  20   0 1331396 131060 poll_s Sl+ pts/2
0:01                          \_ python3.9 setup.py test


>From there the test is stuck.
Some debugging revealed that it does no more come back from:
GDebiGtkTestCase
 -> test_lintian
  -> GDebiGtk (init)
    -> gio_copy_in_place
      -> show_alert

That alert only happens because we run as root, but even if that is avoided
(e.g. by running as another user) then it blocks at the next message. E.g.
when failing to download.

But these blocking alerts are only secondary symptoms.

I've found that all issues come back to a check that seems wrong.
The test wants to copy a non-existing file into a temp path.
At least the current version of Gio.File hates this and errors out
  g-io-error-quark: Operation not supported (15)

Maybe Gio was more tolerant in the past, but checking a non existing
file makes no sense anyway. We can guard that step a bit better than all works.

A fix could look like:
--- /home/ubuntu/gdebi-0.9.5.7+nmu5/GDebi/GDebiGtk.py 2021-06-09
10:17:06.516869439 +0000
+++ /root/gdebi-0.9.5.7+nmu5/GDebi/GDebiGtk.py 2021-06-09
10:09:35.113662314 +0000
@@ -119,7 +119,8 @@
                                  self.on_window_main_drag_data_received)

         # Check file with gio
-        file = self.gio_copy_in_place(file)
+        if file != "" and os.path.exists(file):
+            file = self.gio_copy_in_place(file)

         #self.vte_terminal.set_font_from_string("monospace 10")
         self.cprogress = self.CacheProgressAdapter(self.progressbar_cache)

I've proposed the same to the project [1], but I'm unsure about the speed this
is picked up there - so to avoid this being broken once the switch to 2.68
happens I filed this bug for you.

[1]: https://code.launchpad.net/~paelzer/gdebi/gdebi-fix-glib-2.68/+merge/403954

-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd

Reply via email to