From c60dc977a1a7cd69ce83fbdb4108b7e46e7986c2086f98bcbdea6d6d65082277 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 16 Jun 2020 13:16:31 +0000 Subject: [PATCH] Accepting request 814803 from home:yfjiang:branches:GNOME:Factory - Create a skeleton flatpak repo using "flatpak remotes" instead of a manually created directory (bsc#1172316, bsc#1169619, bsc#1170416). OBS-URL: https://build.opensuse.org/request/show/814803 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/flatpak?expand=0&rev=110 --- flatpak.changes | 7 +++++++ flatpak.spec | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/flatpak.changes b/flatpak.changes index b927a70..5638298 100644 --- a/flatpak.changes +++ b/flatpak.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jun 16 02:21:39 UTC 2020 - Yifan Jiang + +- Create a skeleton flatpak repo using "flatpak remotes" instead + of a manually created directory (bsc#1172316, bsc#1169619, + bsc#1170416). + ------------------------------------------------------------------- Mon May 18 08:53:10 UTC 2020 - Yifan Jiang diff --git a/flatpak.spec b/flatpak.spec index f3cbad9..fcc3a83 100644 --- a/flatpak.spec +++ b/flatpak.spec @@ -179,7 +179,6 @@ rm -Rf %{buildroot}%{_libexecdir}/systemd/user-environment-generators/ %endif mkdir -p %{buildroot}%{_sysconfdir}/flatpak/remotes.d -mkdir -p %{buildroot}%{_localstatedir}/lib/flatpak/repo %find_lang %{name} @@ -195,6 +194,11 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/flatpak/repo %post %service_add_post flatpak-system-helper.service +# Remove any empty repo directory, which is seen as invalid by flatpak. After that, create a skeleton repository using "flatpak remotes". +if [ -e "%{_localstatedir}/lib/flatpak/repo" ] && [ -z "$(ls -A %{_localstatedir}/lib/flatpak/repo)" ]; then +rm -r %{_localstatedir}/lib/flatpak/repo +fi +%{_bindir}/flatpak remotes 1> /dev/null %postun %service_del_postun flatpak-system-helper.service @@ -240,8 +244,7 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/flatpak/repo %{_sbindir}/rcflatpak-system-helper %{_userunitdir}/flatpak-session-helper.service %{_userunitdir}/flatpak-portal.service -%dir %{_localstatedir}/lib/flatpak -%dir %{_localstatedir}/lib/flatpak/repo +%ghost %dir %{_localstatedir}/lib/flatpak %if %{support_environment_generators} %dir %{_libexecdir}/systemd/user-environment-generators %{_libexecdir}/systemd/user-environment-generators/60-flatpak