From ae335f24dca8561a8f719edec243c4f339986c4e Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 19 Apr 2017 00:07:51 +0100 Subject: lib/repo-finder: Add mount based OstreeRepoFinder implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a basic implementation of OstreeRepoFinder which resolves ref names to remote URIs by looking for them on any currently mounted removable storage volumes. The idea is to support OS and app updates via USB stick. Unit tests are included. This bumps libostree’s maximum GLib dependency from 2.44 to 2.50 for g_drive_is_removable(). If GLib 2.50 is not available, the call which needs it will be omitted and the OstreeRepoFinderMount implementation will scan all volumes (not just removable ones); this is a performance hit, but not a functionality hit. Signed-off-by: Philip Withnall Closes: #924 Approved by: cgwalters --- Makefile-libostree.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile-libostree.am') diff --git a/Makefile-libostree.am b/Makefile-libostree.am index 4b968abe..01aa8663 100644 --- a/Makefile-libostree.am +++ b/Makefile-libostree.am @@ -156,11 +156,13 @@ libostree_1_la_SOURCES += \ src/libostree/ostree-remote.h \ src/libostree/ostree-repo-finder.h \ src/libostree/ostree-repo-finder-config.h \ + src/libostree/ostree-repo-finder-mount.h \ $(NULL) else # if ENABLE_EXPERIMENTAL_API libostree_1_la_SOURCES += \ src/libostree/ostree-repo-finder.c \ src/libostree/ostree-repo-finder-config.c \ + src/libostree/ostree-repo-finder-mount.c \ $(NULL) endif @@ -237,7 +239,7 @@ OSTree_1_0_gir_INCLUDES = Gio-2.0 OSTree_1_0_gir_CFLAGS = $(libostree_1_la_CFLAGS) OSTree_1_0_gir_LIBS = libostree-1.la OSTree_1_0_gir_SCANNERFLAGS = --warn-all --identifier-prefix=Ostree --symbol-prefix=ostree -OSTree_1_0_gir_FILES = $(libostreeinclude_HEADERS) $(filter-out %-private.h %/ostree-soup-uri.h %/ostree-repo-finder.h %/ostree-repo-finder-config.h,$(libostree_1_la_SOURCES)) +OSTree_1_0_gir_FILES = $(libostreeinclude_HEADERS) $(filter-out %-private.h %/ostree-soup-uri.h %/ostree-repo-finder.h %/ostree-repo-finder-config.h %/ostree-repo-finder-mount.h,$(libostree_1_la_SOURCES)) INTROSPECTION_GIRS += OSTree-1.0.gir gir_DATA += OSTree-1.0.gir typelib_DATA += OSTree-1.0.typelib -- cgit v1.2.1