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 762625 - Problem distchecking without PackageKit
Problem distchecking without PackageKit
Status: RESOLVED FIXED
Product: gnome-software
Classification: Applications
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Software maintainer(s)
GNOME Software maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-02-24 16:32 UTC by Joaquim Rocha
Modified: 2016-02-26 21:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Fix distcheck with --disable-packagekit (1.64 KB, patch)
2016-02-25 04:34 UTC, Dan Nicholson
none Details | Review
build: Don't distribute built sources (1.78 KB, patch)
2016-02-25 04:34 UTC, Dan Nicholson
none Details | Review

Description Joaquim Rocha 2016-02-24 16:32:32 UTC
Hi, distchecking does not seem to honor building without PackageKit and expects the generated files to exist. Steps to reproduce:

(make sure there are no generated files from previous build: git clean -xdf)
./autogen.sh --enable-packagekit=no
make
make distcheck

It stops with the following error:
make[2]: *** No rule to make target 'gs-packagekit-generated.c', needed by 'distdir'.  Stop.

It'll be the same in systems without PackageKit installed.

Looking in the Makefile.am everything seems fine (PackageKit related files are added supposedly only if PackageKit is available) so it's possible this is a bug in autotools.
Comment 1 Dan Nicholson 2016-02-25 04:34:04 UTC
Created attachment 322331 [details] [review]
build: Fix distcheck with --disable-packagekit

During dist, the generated sources need to be generated since they're
included in gnome_software_SOURCES. However, if PackageKit is disabled,
the recipes for generating the files are commented out.

Remove the conditional around the source file recipes. There's nothing
PackageKit dependent as they just call gdbus-codegen on DBus interface
files in the source tree. All that's needed for keeping them out of the
non-PackageKit build is to have the conditional around
gnome_software_SOURCES.
Comment 2 Dan Nicholson 2016-02-25 04:34:07 UTC
Created attachment 322332 [details] [review]
build: Don't distribute built sources

It's preferred that the built source files are generated by the builder
rather than being created by the developer and distributed with the
tarball. That ensures that the builder's glib-compile-schemas and
gdbus-codegen are used rather than the developer's.
Comment 3 Dan Nicholson 2016-02-25 04:35:08 UTC
Untested, but I'm pretty sure this does the right thing. The 2nd commit is more of a correctness fix as I believe that the built sources should be done by the builder rather than by the developer and distributed in the tarball.
Comment 4 Joaquim Rocha 2016-02-25 20:18:05 UTC
Hi, I have just tested Dan's patches and they solve the issue for the use case I described. Thanks a lot Dan!
Comment 5 Richard Hughes 2016-02-26 21:49:20 UTC
Joaquim pushed these, thanks.