remove cacheUpdates options to avoid partial updates

This commit is contained in:
airclay 2021-09-11 13:00:37 -05:00
parent 3e86a3e3db
commit 52a8036b42
5 changed files with 1 additions and 50 deletions

View File

@ -8,14 +8,11 @@ To install and use: Place files in appropriate locations and run appropriate com
Uses config file for options. Uses config file for options.
- Terminal command and option (usually `-e`) - Terminal command and option (usually `-e`)
- Timer duration for `checkupdates` to run in backgound - 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 - Custom system tray icon
Includes: Includes:
- .desktop file for autostarting - .desktop file for autostarting
- Pacman hook files to avoid partial updates
- Tray and shortcut icons - Tray and shortcut icons
TODO TODO
- look into adding option to view news - look into adding option to view news or quick list

View File

@ -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

View File

@ -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

View File

@ -32,11 +32,6 @@ def count():
global avail global avail
avail = str(output)+" Updates" avail = str(output)+" Updates"
# Download pkg's to cache
def cacheUpdates():
cmd = ['checkupdates', '-d']
subprocess.run(cmd)
# Run system update # Run system update
def update(): def update():
cmd = [ term, opt, 'sudo', 'pacman', '-Syu'] cmd = [ term, opt, 'sudo', 'pacman', '-Syu']
@ -51,10 +46,6 @@ def newText():
# Initially populate available updates # Initially populate available updates
count() count()
# Download pkg's to cache
if eval(cache) == True:
cacheUpdates()
app = QApplication([]) app = QApplication([])
app.setQuitOnLastWindowClosed(False) app.setQuitOnLastWindowClosed(False)
@ -77,9 +68,6 @@ menu.addAction(option1)
# Set up timer to update count # Set up timer to update count
timer = QTimer() timer = QTimer()
timer.timeout.connect(newText) timer.timeout.connect(newText)
# Download pkg's to cache on timeout
if eval(cache) == True:
timer.timeout.connect(cacheUpdates)
timer.start(wait) timer.start(wait)
# To quit the app # To quit the app

View File

@ -10,6 +10,3 @@ timer: 10
# custom icons should follow Arch linux standards # custom icons should follow Arch linux standards
# custom icons should be stored in ~/.config/systrayUpdater # custom icons should be stored in ~/.config/systrayUpdater
icon: white-logo.png icon: white-logo.png
# If you would like to automatically download pkg's to cache
# uses 'checkupdates -d' in background
cache: true