Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
Revert "fix: Port over a fix for flatpaks failing to install from Baz…
Browse files Browse the repository at this point in the history
…zite (ublue-os#730)"

This reverts commit 846af93.
  • Loading branch information
KyleGospo committed Dec 18, 2023
1 parent 891b7e3 commit 4c490b7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 29 deletions.
23 changes: 8 additions & 15 deletions usr/bin/ublue-system-flatpak-manager
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,20 @@ fi

# Lists of flatpaks
FLATPAK_LIST=$(flatpak list --columns=application)
INSTALL_LIST_FILE="/etc/flatpak/system/install"
REMOVE_LIST_FILE="/etc/flatpak/system/remove"

INSTALL_LIST=$(cat /etc/flatpak/system/install)
REMOVE_LIST=$(cat /etc/flatpak/system/remove)

# Install flatpaks in list
if [[ -f $INSTALL_LIST_FILE ]]; then
INSTALL_LIST=$(echo $FLATPAK_LIST | grep -vf - $INSTALL_LIST_FILE)
if [[ -n $INSTALL_LIST ]]; then
if ! flatpak install --system --noninteractive flathub ${INSTALL_LIST[@]}; then
# exit on error
exit 1
fi
if [[ -n $INSTALL_LIST ]]; then
if ! flatpak install --system --noninteractive flathub ${INSTALL_LIST[@]}; then
# exit on error
exit 1
fi
fi

# Remove flatpaks in list once
if [[ ! -f $VER_FILE && -f $REMOVE_LIST_FILE ]]; then
REMOVE_LIST=$(echo $FLATPAK_LIST | grep -f - $REMOVE_LIST_FILE)
if [[ -n $REMOVE_LIST ]]; then
flatpak remove --system --noninteractive ${REMOVE_LIST[@]}
fi
if [[ ! -f $VER_FILE && -n $REMOVE_LIST ]]; then
flatpak remove --system --noninteractive ${REMOVE_LIST[@]}
fi

# Opt out of and remove Fedora's flatpak repo
Expand Down
22 changes: 8 additions & 14 deletions usr/bin/ublue-user-flatpak-manager
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,20 @@ flatpak remote-add --if-not-exists --user flathub /etc/flatpak/remotes.d/flathub

# Lists of flatpaks
FLATPAK_LIST=$(flatpak list --columns=application)
INSTALL_LIST_FILE="/etc/flatpak/user/install"
REMOVE_LIST_FILE="/etc/flatpak/user/remove"
INSTALL_LIST=$(cat /etc/flatpak/user/install)
REMOVE_LIST=$(cat /etc/flatpak/user/remove)

# Install flatpaks in list
if [[ -f $INSTALL_LIST_FILE ]]; then
INSTALL_LIST=$(echo $FLATPAK_LIST | grep -vf - $INSTALL_LIST_FILE)
if [[ -n $INSTALL_LIST ]]; then
if ! flatpak install --user --noninteractive flathub ${INSTALL_LIST[@]}; then
# exit on error
exit 1
fi
if [[ -n $INSTALL_LIST ]]; then
if ! flatpak install --user --noninteractive flathub ${INSTALL_LIST[@]}; then
# exit on error
exit 1
fi
fi

# Remove flatpaks in list once
if [[ ! -f $VER_FILE && -f $REMOVE_LIST_FILE ]]; then
REMOVE_LIST=$(echo $FLATPAK_LIST | grep -f - $REMOVE_LIST_FILE)
if [[ -n $REMOVE_LIST ]]; then
flatpak remove --user --noninteractive ${REMOVE_LIST[@]}
fi
if [[ ! -f $VER_FILE && -n $REMOVE_LIST ]]; then
flatpak remove --user --noninteractive ${REMOVE_LIST[@]}
fi

notify-send "Flatpak installer" "Finished installing user flatpaks" --app-name="Flatpak installer" -u NORMAL
Expand Down

0 comments on commit 4c490b7

Please sign in to comment.