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 789725 - Allow building tracker as a subproject of tracker-miners
Allow building tracker as a subproject of tracker-miners
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Miners
git master
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2017-10-31 17:38 UTC by Sam Thursfield
Modified: 2017-12-16 14:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
meson: Add tracker core as a subproject (1.72 KB, patch)
2017-10-31 17:38 UTC, Sam Thursfield
none Details | Review
Rename libtracker-common to libtracker-miners-common (91.24 KB, patch)
2017-10-31 17:39 UTC, Sam Thursfield
none Details | Review
Rename libtracker-common to libtracker-miners-common (96.42 KB, patch)
2017-12-04 12:10 UTC, Sam Thursfield
accepted-commit_now Details | Review
meson: Add tracker core as a subproject (1.95 KB, patch)
2017-12-04 12:11 UTC, Sam Thursfield
accepted-commit_now Details | Review

Description Sam Thursfield 2017-10-31 17:38:13 UTC
This branch (sam/meson-subproject) set lets us build tracker core as part of tracker-miners using Meson.

The tricky part is that we can't have two targets called 'libtracker-common' in a combined build, so I've renamed the library to 'libtracker-miners-common' in the tracker-miners repo.

I haven't updated the Autotools build system for this, but am happy to look at that if needed.
Comment 1 Sam Thursfield 2017-10-31 17:38:41 UTC
Created attachment 362672 [details] [review]
meson: Add tracker core as a subproject

This allows building tracker-miners and tracker core with a single
invocation of Meson and Ninja. It also allows apps to embed their
own copy of Tracker just by adding tracker-miners as a subproject in
their Meson buildsystem.
Comment 2 Sam Thursfield 2017-10-31 17:39:04 UTC
Created attachment 362673 [details] [review]
Rename libtracker-common to libtracker-miners-common

We made a big compromise when splitting tracker core from tracker-miners
in that the common code that was needed by both parts would end up
duplicated. It's ugly but it works fine at the moment and allows us to
keep all of the common code private.

I had an issue when trying to embed tracker core into tracker-miners as
a Meson subproject though. Having two targets named tracker-common
caused confusion as duplicate targets aren't allowed, but they are not
quite equivalent so we can't just pick one or the other.

To work around this, I've renamed the copy in this repo to
tracker-miners-common. This only affects the target names, not the
actual function names.
Comment 3 Sam Thursfield 2017-12-04 12:10:15 UTC
Created attachment 364907 [details] [review]
Rename libtracker-common to libtracker-miners-common

We made a big compromise when splitting tracker core from tracker-miners
in that the common code that was needed by both parts would end up
duplicated. It's ugly but it works fine at the moment and allows us to
keep all of the common code private.

I had an issue when trying to embed tracker core into tracker-miners as
a Meson subproject though. Having two targets named tracker-common
caused confusion as duplicate targets aren't allowed, but they are not
quite equivalent so we can't just pick one or the other.

To work around this, I've renamed the copy in this repo to
tracker-miners-common. This only affects the target names, not the
actual function names.
Comment 4 Sam Thursfield 2017-12-04 12:11:19 UTC
Created attachment 364908 [details] [review]
meson: Add tracker core as a subproject

This allows building tracker-miners and tracker core with a single
invocation of Meson and Ninja. It also allows apps to embed their
own copy of Tracker just by adding tracker-miners as a subproject in
their Meson buildsystem.
Comment 5 Carlos Garnacho 2017-12-16 11:43:37 UTC
Comment on attachment 364907 [details] [review]
Rename libtracker-common to libtracker-miners-common

Looks good! I already see some candidates for cleanup (eg. the vapi file is unused), but it's not within the scope of this patch :).

I guess this means commit 9afd9afc67a2ccbe4d8eee59a4b9be796e794f2d in the tracker repo can be reverted?
Comment 6 Carlos Garnacho 2017-12-16 11:50:05 UTC
Comment on attachment 364908 [details] [review]
meson: Add tracker core as a subproject

Neat :). I find subproject() vs false somewhat odd... is the else path any essential?
Comment 7 Sam Thursfield 2017-12-16 13:52:47 UTC
The else path is from an old version of the patch, it can be removed.

And yes, 9afd9afc67a2ccbe4d8eee59a4b9be796e794f2d can be reverted now -- I'll do that after the merge.