After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 742380 - Make us of pkg.require to list dependencies
Make us of pkg.require to list dependencies
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2015-01-05 13:27 UTC by Jonas Danielsson
Modified: 2015-01-05 14:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
main: Add required GIR dependencies (1.41 KB, patch)
2015-01-05 13:28 UTC, Jonas Danielsson
committed Details | Review
main: Move pkg.init* calls to the top of the file (1.02 KB, patch)
2015-01-05 14:17 UTC, Damián Nohales
committed Details | Review

Description Jonas Danielsson 2015-01-05 13:27:55 UTC
We are now using the Gjs package.js functionality. So we can use the pkg.require method, more here: https://wiki.gnome.org/Projects/Gjs/Package

We can list the gir repositories we depend on and have Maps exit if they are not available. We can specify an API version to depend on. What we cannot do is specify a version of the package we depend on. So we still have no way to say "we need version 3.15.3 of GeocodeGlib", unfortunately. How should we deal with that? Just expect people to use jhbuild and get it right?
Comment 1 Jonas Danielsson 2015-01-05 13:28:38 UTC
Created attachment 293819 [details] [review]
main: Add required GIR dependencies

Use pkg.require to mark a set of dependencies on GI and standard
JS modules. The keys are repository names and the values are API
versions.

This will not specify the required _version_ of the package we
depend on. But it will make sure that the required package is
installed.

If a check fails a message will be printed and the application will
quit.
Comment 2 Damián Nohales 2015-01-05 14:10:34 UTC
Review of attachment 293819 [details] [review]:

Nice. Just add Goa, GtkClutter and GWeather.
Comment 3 Damián Nohales 2015-01-05 14:17:56 UTC
Created attachment 293820 [details] [review]
main: Move pkg.init* calls to the top of the file

This is done in that way in gnome-weather and gtk-js-app so let's use
the same style.

---

Just realized this :)