GNOME Bugzilla – Bug 762625
Problem distchecking without PackageKit
Last modified: 2016-02-26 21:49:20 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.
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.
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.
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.
Hi, I have just tested Dan's patches and they solve the issue for the use case I described. Thanks a lot Dan!
Joaquim pushed these, thanks.