Incorrect soft dependencies version checks prevent clean downstream packaging
@jeff
Submitted by Jeff F.T. Assigned to Thibault Saunier @thiblahute
Description
As sparked on https://bugzilla.redhat.com/show_bug.cgi?id=1283968#c8
Elad said:
There are no python bindings, this is a gobject-introspection enabled library. Pitivi seems to require version 1.0 of the library, but Fedora only has 0.7. The latest version according to upstream git is 0.7.6 So please fix this upstream by changing line 391 in check.py to require 0.7; similarly, in the same file, for GnomeDesktop, the version you want is 3.0
Then (loosely quoting a discussion on IRC):
<aleb>
that's the API level required, not the library version required...
<nekohayo>
doesn't sound terribly clear for packagers, maybe needs to be clarified in that code or in http://wiki.pitivi.org/wiki/Dependencies ?
<elad>
aleb: that's wrong; when you do require_version you require a specific version of a library
<aleb>
There are already some comments here: https://phabricator.freedesktop.org/D386
<elad>
I doubt you have GnomeDesktop 1.0 installed on your system. The problem is that your dependency versions in this file are wrong: you need GnomeDesktop 3.0, not 1.0 (there's no 1.0)
<nekohayo>
aleb's point was that it was looking for the "1.0 version of the API"... but that took me by surprise too, sounds a bit unnatural to me as a user
<elad>
right, but it is the same as the major version of the library in those two cases
I did some work on gi integration in Builder so I know how this all works
on line 135 you use gi.require_version; if you require_version for a namespace that doesn't exist, such as GnomeDesktop 1.0, it will fail. And you hide the exception there for obvious reasons
you can see which versions you have on your system by doing ls /usr/lib64/girepository-1.0/
the reason for the version is that by default gi imports the latest it can find, (and shows a warning). So when Gtk 4 comes along, you still want your code to import Gtk 3.0 until you finish porting to 4.0. And that's why gi started warning about versions
<nekohayo>
elad, so... the only fix is to change the 1.0 to 0.7 and 3.0 in those lines? or there's something bigger to be done in that check.py?
<elad>
nekohayo: yeah, from my understanding
<nekohayo>
yes to which? :)
<elad>
oh sorry I only read half of the sentence
the first half is right
unless you want to go to the future and bring 1.0 libnotify, and then travel back to the past and port gnome 1 to GObject Introspection :P
<nekohayo>
that would require fixing https://bugzilla.gnome.org/show_bug.cgi?id=171940
A question is how we handle this... sounds a bit over-kill to make a 0.95.1 release just for a two-liner change!