Skip to content

Commit 56938e2

Browse files
authored
fix: Remove flatpak caching, use network connection instead (#110)
* fix: Stop caching flatpaks These take up way too much space in images * fix(flatpak-system-install): Require network connection * fix(flatpak-system-install): Restart on failure * fix(gnome): Add Silverblue flatpaks to install list * fix(flatpak-system-install): Silence errors on package removal A package may not be removed for a number of reasons, for example if someone were to rebase from Kinoite to Bazzite GNOME, they wouldn't have the GNOME app suite installed from Silverblue * fix(deck): Don't try to install cached system flatpaks
1 parent 11d4c66 commit 56938e2

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

Containerfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ RUN rm /usr/share/applications/shredder.desktop && \
133133
sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/system.conf && \
134134
mkdir -p /etc/flatpak/remotes.d && \
135135
wget -q https://dl.flathub.org/repo/flathub.flatpakrepo -P /etc/flatpak/remotes.d && \
136-
cat /etc/flatpak/install | while read line; do flatpak install --system --noninteractive --no-deploy flathub $line; done && \
137-
cat /etc/flatpak/deck | while read line; do flatpak install --system --noninteractive --no-deploy flathub $line; done && \
138-
mkdir -p /etc/flatpak/{flathub,objects} && \
139-
cp -r /var/lib/flatpak/repo/refs/remotes/flathub/* /etc/flatpak/flathub && \
140-
cp -r /var/lib/flatpak/repo/objects/* /etc/flatpak/objects && \
141136
systemctl unmask flatpak-system-install.service && \
142137
systemctl enable flatpak-system-install.service && \
143138
systemctl disable rpm-ostreed-automatic.timer && \
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
[Unit]
22
Description=Install System Flatpak on boot
33
Documentation=https://github.com/ublue-os/endlish-oesque/issues/10
4+
Wants=network-online.target
5+
After=network-online.target
46

57
[Service]
68
Type=oneshot
79
ExecStart=/usr/bin/ublue-flatpak-system-install
10+
Restart=on-failure
811

912
[Install]
1013
WantedBy=multi-user.target

system_files/desktop/shared/usr/bin/ublue-flatpak-system-install

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,22 @@
22
source /etc/default/bazzite
33

44
if [[ -f '/etc/flatpak/install' ]]; then
5-
cp -r /etc/flatpak/flathub/* /var/lib/flatpak/repo/refs/remotes/flathub
6-
cp -r /etc/flatpak/objects/* /var/lib/flatpak/repo/objects
75
cat /etc/flatpak/install | while read line; do
8-
flatpak install --system --noninteractive --no-pull flathub $line
6+
flatpak install --system --noninteractive flathub $line
97
done && mv /etc/flatpak/install /etc/flatpak/installed
108
fi
119

1210
if [[ -f '/etc/flatpak/remove' ]]; then
1311
cat /etc/flatpak/remove | while read line; do
14-
flatpak remove --system --noninteractive $line
15-
done && mv /etc/flatpak/install /etc/flatpak/removed
12+
flatpak remove --system --noninteractive $line 2>/dev/null
13+
done
14+
mv /etc/flatpak/remove /etc/flatpak/removed
1615
fi
1716

1817
if [[ -f '/etc/flatpak/deck' ]]; then
1918
if [[ ${IMAGE_NAME} == *'deck'* ]]; then
2019
cat /etc/flatpak/deck | while read line; do
21-
flatpak install --system --noninteractive --no-pull flathub $line
20+
flatpak install --system --noninteractive flathub $line
2221
done && cat /etc/flatpak/deck >> /etc/flatpak/installed
2322
fi
2423
fi

system_files/desktop/silverblue/etc/flatpak/install

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,24 @@ net.davidotek.pupgui2
22
org.freedesktop.Platform.VulkanLayer.MangoHud//22.08
33
org.freedesktop.Platform.VulkanLayer.vkBasalt//22.08
44
io.github.Foldex.AdwSteamGtk
5-
org.gnome.Loupe
65
com.mattjakeman.ExtensionManager
76
org.gtk.Gtk3theme.adw-gtk3
87
org.gtk.Gtk3theme.adw-gtk3-dark
98
org.mozilla.firefox
109
com.github.tchx84.Flatseal
10+
org.gnome.Calculator
11+
org.gnome.Calendar
12+
org.gnome.Characters
13+
org.gnome.Connections
14+
org.gnome.Contacts
15+
org.gnome.Evince
16+
org.gnome.Extensions
17+
org.gnome.Logs
18+
org.gnome.Loupe
19+
org.gnome.Maps
20+
org.gnome.NautilusPreviewer
21+
org.gnome.TextEditor
22+
org.gnome.Weather
23+
org.gnome.baobab
24+
org.gnome.clocks
25+
org.gnome.font-viewer

0 commit comments

Comments
 (0)