From 52a8036b42f995fd0d0238a7284212398e739ac9 Mon Sep 17 00:00:00 2001 From: airclay Date: Sat, 11 Sep 2021 13:00:37 -0500 Subject: [PATCH] remove cacheUpdates options to avoid partial updates --- README.md | 5 +---- noPartial.hook | 9 --------- noPartial.sh | 22 ---------------------- systrayUpdater | 12 ------------ systrayupdater.yml | 3 --- 5 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 noPartial.hook delete mode 100755 noPartial.sh diff --git a/README.md b/README.md index 0752d70..753f56f 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,11 @@ To install and use: Place files in appropriate locations and run appropriate com Uses config file for options. - Terminal command and option (usually `-e`) - Timer duration for `checkupdates` to run in backgound -- Option to use `checkupdates -d` to preload new pkgs to cache - (must complete update before installing new pkgs or suffer partial updates!) - Custom system tray icon Includes: - .desktop file for autostarting -- Pacman hook files to avoid partial updates - Tray and shortcut icons TODO -- look into adding option to view news +- look into adding option to view news or quick list diff --git a/noPartial.hook b/noPartial.hook deleted file mode 100644 index ac15968..0000000 --- a/noPartial.hook +++ /dev/null @@ -1,9 +0,0 @@ -[Trigger] -Operation = Install -Type = Package -Target = * -[Action] -Description = Avoiding partial upgrades -When = PreTransaction -Exec = /etc/pacman.d/hooks.bin/noPartial.sh -AbortOnFail diff --git a/noPartial.sh b/noPartial.sh deleted file mode 100755 index f6733d9..0000000 --- a/noPartial.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -RED='\033[0;31m' -LUPDATE="$(grep 'pacman -Syu' /var/log/pacman.log | tail -1| awk -F'[][]' '{print $2}')" -MODPKGS="$(find /var/cache/pacman/pkg -type f -newermt $LUPDATE)" - -if [[ -n $MODPKGS ]]; then - echo - echo -e "\a" - echo -e " ${RED}[WARNING]${NC}" - echo -e " ${RED}There are newer package files in the cache${NC}" - echo -e " ${RED}Sending error signals and aborting${NC}" - echo - echo -e " ${RED}Please run full update before continuing${NC}" - echo - exit 1 -elif [[ -z $MODPKGS ]]; then - exit 0 -else - echo " Error?" - exit 1 -fi diff --git a/systrayUpdater b/systrayUpdater index 37362ba..1e5f03f 100755 --- a/systrayUpdater +++ b/systrayUpdater @@ -32,11 +32,6 @@ def count(): global avail avail = str(output)+" Updates" -# Download pkg's to cache -def cacheUpdates(): - cmd = ['checkupdates', '-d'] - subprocess.run(cmd) - # Run system update def update(): cmd = [ term, opt, 'sudo', 'pacman', '-Syu'] @@ -51,10 +46,6 @@ def newText(): # Initially populate available updates count() -# Download pkg's to cache -if eval(cache) == True: - cacheUpdates() - app = QApplication([]) app.setQuitOnLastWindowClosed(False) @@ -77,9 +68,6 @@ menu.addAction(option1) # Set up timer to update count timer = QTimer() timer.timeout.connect(newText) -# Download pkg's to cache on timeout -if eval(cache) == True: - timer.timeout.connect(cacheUpdates) timer.start(wait) # To quit the app diff --git a/systrayupdater.yml b/systrayupdater.yml index 38ba100..4882256 100644 --- a/systrayupdater.yml +++ b/systrayupdater.yml @@ -10,6 +10,3 @@ timer: 10 # custom icons should follow Arch linux standards # custom icons should be stored in ~/.config/systrayUpdater icon: white-logo.png -# If you would like to automatically download pkg's to cache -# uses 'checkupdates -d' in background -cache: true