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 776673 - Recompile resources when builddir is not same as srcdir
Recompile resources when builddir is not same as srcdir
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
3.23.x
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2017-01-01 12:04 UTC by Alberto Fanjul
Modified: 2017-01-16 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix resource compilation (987 bytes, patch)
2017-01-01 12:04 UTC, Alberto Fanjul
committed Details | Review

Description Alberto Fanjul 2017-01-01 12:04:22 UTC
Created attachment 342691 [details] [review]
Fix resource compilation

Using systems like jhbuild buildir is not the same as srcdir

This patch allows to modify ~/jhbuild/checkout/gnome-music and recompile and run with:

    $ jhbuild buildone gnome-music
    $ jhbuild run gnome-music
Comment 1 Marinus Schraal 2017-01-09 13:04:24 UTC
I don't use jhbuild. You have to go over this for me in detail, what does this change do and how does it affect the build exactly?
Comment 2 Alberto Fanjul 2017-01-09 13:49:16 UTC
gresource is recompiled if you touch any ui file or gnome-music.gresource.xml

To detect ui files it uses

https://git.gnome.org/browse/gnome-music/tree/data/Makefile.am#n1

This works if you to ./autogen.sh (configure is done automatically) inside checkout dir as it looks for:

$(builddir)/gnome-music.gresource.xml)


Is just that jhbuild compile on different path.

jhbuild checkout normally on: (srcdir)

~/jhbuild/checkout/gnome-music

and compile on: (builddir)

~/.cache/jhbuild/builds/gnome-music

If you touch something on ui files it is not recompiled since it cannot find gnome-music.gresource.xml. it looks for it on ~/.cache/jhbuild/builds/gnome-music instead of ~/jhbuild/checkout/gnome-music

You can test it doing (with and without patch):

    $ git clone https://git.gnome.org/browse/gnome-music
    $ mkdir gnome-music-build
    $ cd gnome-music-build
    $ ../gnome-music/autogen.sh
    $ make

Touch any ui file and it will not detect the need for recompilation.

This is a safe change as it will keep working if buildir is same as srcdir (your case) but will work on jhbuild too.
Comment 3 Marinus Schraal 2017-01-16 10:12:26 UTC
Thank for the patch & explanation. Looks good to me.