From 351c2d5bd2e740dd5ef93c36550b4b99b8b2c113 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 21 Apr 2016 18:47:11 +0200 Subject: [PATCH] Read system remotes from /etc/xdg-app/remotes.d/*.conf --- Makefile.am | 1 + common/xdg-app-dir.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 94dcb8780..7f075a253 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,6 +28,7 @@ XDG_APP_BINDIR=$(bindir) AM_CPPFLAGS = \ -DXDG_APP_BINDIR=\"$(XDG_APP_BINDIR)\" \ -DXDG_APP_SYSTEMDIR=\"$(localstatedir)/lib/xdg-app\"\ + -DXDG_APP_CONFIGDIR=\"$(sysconfdir)/xdg-app\"\ -DXDG_APP_BASEDIR=\"$(pkgdatadir)\" \ -DXDG_APP_TRIGGERDIR=\"$(pkgdatadir)/triggers\" \ -DSYSTEM_FONTS_DIR=\"$(SYSTEM_FONTS_DIR)\" \ diff --git a/common/xdg-app-dir.c b/common/xdg-app-dir.c index a780926f9..01aad6701 100644 --- a/common/xdg-app-dir.c +++ b/common/xdg-app-dir.c @@ -625,7 +625,12 @@ xdg_app_dir_ensure_repo (XdgAppDir *self, goto out; repodir = g_file_get_child (self->basedir, "repo"); - repo = ostree_repo_new (repodir); + if (self->user) + repo = ostree_repo_new (repodir); + else + repo = g_object_new (OSTREE_TYPE_REPO, "path", repodir, + "remotes-config-dir", XDG_APP_CONFIGDIR "/remotes.d", + NULL); if (!g_file_query_exists (repodir, cancellable)) {