mirror of
https://github.com/moparisthebest/pacman
synced 2024-10-31 15:45:03 -04:00
repo-remove: remove deltas file if it becomes empty
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
3be02aa27c
commit
62e8812fb9
@ -176,6 +176,11 @@ db_remove_delta() {
|
||||
if grep -q "$filename" $deltas; then
|
||||
sed -i.backup "/$filename/d" $deltas && rm -f $deltas.backup
|
||||
msg2 "$(gettext "Removing existing entry '%s'...")" "$filename"
|
||||
# empty deltas file contains only "%DELTAS%"
|
||||
if (( $(wc -l < "$deltas") == 1 )); then
|
||||
msg2 "$(gettext "Removing empty deltas file ...")"
|
||||
rm "$deltas"
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user