1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 07:48:50 -05:00

pacman-db-upgrade: fix issue with find argument list length overflow

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2014-11-25 21:58:05 +10:00
parent 41c8263ba2
commit ed4032a908

View File

@ -174,7 +174,10 @@ if [[ -z "$db_version" ]]; then
dirlist+=("${pacroot}${dir%/}")
done < <(grep -h '/$' "$dbroot"/local/*/files | sort -ru)
mapfile -t dirlist < <(find "${dirlist[@]}" -maxdepth 0 -type l)
mapfile -t dirlist < <(
for dir in "${dirlist[@]}"; do
[[ -L "$dir" ]] && echo "$dir"
done)
if [[ ${#dirlist[@]} != 0 ]]; then
msg "$(gettext "Pre-4.2 database format detected - upgrading...")"