Merge lp:~paelzer/gdebi/gdebi-fix-glib-2.68 into lp:gdebi

Proposed by Christian Ehrhardt 
Status: Needs review
Proposed branch: lp:~paelzer/gdebi/gdebi-fix-glib-2.68
Merge into: lp:gdebi
Diff against target: 13 lines (+2/-1)
1 file modified
GDebi/GDebiGtk.py (+2/-1)
To merge this branch: bzr merge lp:~paelzer/gdebi/gdebi-fix-glib-2.68
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+403954@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for the patch. Unfortunately this patch does not look quite correct.

The function gio_copy_in_place() is a small helper that is meant to downlaod the file to the local system for non "file:/" urls. For remote urls the "os.path.exists(file)" will always be false so this will break gdebi operations on urls (I might read this code wrong though, it has been some years since I actively worked on gdebi :)

I assume this is patch was created to fix an autopkgtest issue? Do you have more details, like a failed run or anything like this?

review: Needs Fixing
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Michael,
thanks for clarifying.

In that case we can still make it work well, let me rewrite it.
I'm ok that we don't use file-exist - I've had it verify to work if we only use '!=""'.
So if called (e.g. from tests) without a path then don't enter that.

I'll push it in a bit once I have bzr convinced to do what I want.

494. By Christian Ehrhardt 

gio_copy_in_place can be used for remote urls

Due to that let us now check on os.path.exists, but still if no path/uri
was passed at all skip the call.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The linked bug reports in comment #1 here hold more details and test logs.
Also I've now properly linked the LP bug to the MP.

I re-pushed the branch with another commit on top removing the os.path.exists

Revision history for this message
Michael Vogt (mvo) wrote :

Thank you, this looks fine.

review: Approve

Unmerged revisions

494. By Christian Ehrhardt 

gio_copy_in_place can be used for remote urls

Due to that let us now check on os.path.exists, but still if no path/uri
was passed at all skip the call.

493. By Christian Ehrhardt 

Avoid hangs with glib2-0 2.68 and later

The behavior of gio.File changes and got more restrictive.
gdebi used to call gio_copy_in_place to check the file, but that
now either fails badly:
    g-io-error-quark: Operation not supported (15)
and/or gets stuck in tests when printing error messages (triggered by
the above root cause)

The problem is that without an argument passed to "file" it tries to
copy a non-existing file in place which fails.

In this case (no filename passed) just don't check on the files.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'GDebi/GDebiGtk.py'
2--- GDebi/GDebiGtk.py 2015-07-08 13:31:21 +0000
3+++ GDebi/GDebiGtk.py 2021-06-09 12:56:23 +0000
4@@ -119,7 +119,8 @@
5 self.on_window_main_drag_data_received)
6
7 # Check file with gio
8- file = self.gio_copy_in_place(file)
9+ if file != "":
10+ file = self.gio_copy_in_place(file)
11
12 #self.vte_terminal.set_font_from_string("monospace 10")
13 self.cprogress = self.CacheProgressAdapter(self.progressbar_cache)

Subscribers

People subscribed via source and target branches

to status/vote changes: