Fix locale handling, menu re-entry and empty-checkupdates logging
- The runner now forces LC_ALL=C itself instead of relying on the unit's Environment=. pacman failures are classified by matching its output, so a run started by hand on a German system was misclassifying every failure. - 'Update now' in the menu exec'd the runner, which terminated the menu. - Log a distinct message when checkupdates is unavailable, instead of claiming zero pending packages before a full upgrade.
This commit is contained in:
1 parent
ceb024d7be
commit
459cbbf8e7
3 files changed
+20
-4
No files matched your search
+10
-3
@@ -76,9 +76,16 @@ cau_pacman_update() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
CAU_PACMAN_COUNT="$(grep -c . <<< "$CAU_PACMAN_PENDING")"
|
||||
[[ $CAU_PACMAN_COUNT =~ ^[0-9]+$ ]] || CAU_PACMAN_COUNT=0
|
||||
cau_info "Updating $CAU_PACMAN_COUNT repository package(s)"
|
||||
if [[ -n $CAU_PACMAN_PENDING ]]; then
|
||||
CAU_PACMAN_COUNT="$(grep -c . <<< "$CAU_PACMAN_PENDING")"
|
||||
[[ $CAU_PACMAN_COUNT =~ ^[0-9]+$ ]] || CAU_PACMAN_COUNT=0
|
||||
cau_info "Updating $CAU_PACMAN_COUNT repository package(s)"
|
||||
else
|
||||
# checkupdates is unavailable, so the list is unknown and pacman is
|
||||
# asked to work it out itself.
|
||||
CAU_PACMAN_COUNT=0
|
||||
cau_info "Running a full system upgrade (pending list unavailable)"
|
||||
fi
|
||||
|
||||
mapfile -t flags < <(cau_pacman_flags)
|
||||
log="$(mktemp)" || return 1
|
||||
|
||||
Reference in new issue
Block a user