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 673101 - resource compiler dependency generation not working for generated files
resource compiler dependency generation not working for generated files
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 752884 (view as bug list)
Depends on:
Blocks: 742347
 
 
Reported: 2012-03-29 16:56 UTC by Christian Persch
Modified: 2016-08-23 02:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix resource compiler dependency generation for generated files (3.72 KB, patch)
2015-01-03 05:20 UTC, Garrett Regier
none Details | Review
glib-compile-resources: correct resource compiler dependency for generated files (3.85 KB, patch)
2016-06-04 02:23 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description Christian Persch 2012-03-29 16:56:42 UTC
Supposed the resource file contains a <file> that doesn't exist yet because it's autogenerated by some other rules. Now --generate-dependencies will error out since it cannot find that file in any --sourcedir directories.

I think --generated-dependencies should just print the files as-is, without trying to resolve them to source directories.
Comment 1 Garrett Regier 2015-01-03 05:20:30 UTC
Created attachment 293629 [details] [review]
Fix resource compiler dependency generation for generated files

Don't require that files can be resolved when generating dependencies.
Comment 2 Garrett Regier 2015-04-10 21:50:18 UTC
ping?
Comment 3 Garrett Regier 2015-07-26 15:57:35 UTC
*** Bug 752884 has been marked as a duplicate of this bug. ***
Comment 4 Matthias Clasen 2015-07-26 16:01:06 UTC
This is a little difficult in the general case. If you specify multiple --sourcedir arguments, we have to scan the directories to find the one the file is actually in.
Comment 5 Garrett Regier 2015-07-26 16:11:46 UTC
(In reply to Matthias Clasen from comment #4)
> This is a little difficult in the general case. If you specify multiple
> --sourcedir arguments, we have to scan the directories to find the one the
> file is actually in.

It still does that and will use a file found in one of the source directories if possible. However, if it cannot find the file it will assume that the file will be built and is in the builddir.
Comment 6 Matthias Clasen 2015-07-26 18:26:19 UTC
That sounds ok then. Would be good to have a test for this behavior
Comment 7 Garrett Regier 2015-07-26 18:29:34 UTC
(In reply to Matthias Clasen from comment #6)
> That sounds ok then. Would be good to have a test for this behavior

Well I did include a basic test case in the patch, don't really know what else is desired past that...
Comment 8 Matthias Clasen 2015-07-27 00:07:52 UTC
Oh, I was looking for a test that would run glib-compile-resources with various commandline options, and verifies that the produced output matches whats expected.
Comment 9 Matthias Clasen 2015-07-27 00:16:02 UTC
Review of attachment 293629 [details] [review]:

ok then
Comment 10 Matthias Clasen 2015-09-01 14:44:16 UTC
Review of attachment 293629 [details] [review]:

patch doesn't apply cleanly anymore
Comment 11 Georges Basile Stavracas Neto 2016-06-04 02:23:44 UTC
Created attachment 329105 [details] [review]
glib-compile-resources: correct resource compiler dependency for generated files

Update the patch to apply against master.

Thanks Christian Hergert for pointing me here, and Garret Regier for working on the first patch.
Comment 12 Colin Walters 2016-06-04 12:23:52 UTC
Review of attachment 329105 [details] [review]:

I only gave this one a superficial review, going my mclasen's r+ here mostly.
Comment 13 Colin Walters 2016-06-04 12:24:53 UTC
Attachment 329105 [details] pushed as 5411a18 - glib-compile-resources: correct resource compiler dependency for generated files
Comment 14 Vladimír Čunát 2016-08-22 21:29:26 UTC
That commit triggers a breakage during gnome-calculator-3.20.2 build with:
> No rule to make target 'history-entry.ui', needed by 'resources.c'.

I tested that reverting 5411a18 from glib-2.48.2 makes it succeed again. Do you see how to fix that? I'm completely unfamiliar with glib/gnome build system etc.

Downstream link: https://github.com/NixOS/nixpkgs/issues/17912
Full build log: http://hydra.nixos.org/build/38984080/nixlog/1/raw
Comment 15 Jürg Billeter 2016-08-23 02:30:04 UTC
(In reply to Vladimír Čunát from comment #14)
> That commit triggers a breakage during gnome-calculator-3.20.2 build with:
> > No rule to make target 'history-entry.ui', needed by 'resources.c'.

This is a bug in gnome-calculator. history-entry.ui and history-view.ui are in the data directory in git but not in the dist tarball. This is already fixed in master by commits d746da96 and d5b2a1f9 but still broken in the gnome-3-20 branch.