summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2014-11-25 21:58:05 +1000
committerAllan McRae <allan@archlinux.org>2014-11-26 12:53:44 +1000
commited4032a90813ba29ee11c71ac6af3090d96789ce (patch)
treee60b8e8a7745bc76a2855255f55bf4d9e3d25c54 /scripts
parent41c8263ba289dac191d7f74faaa62476baf41c28 (diff)
downloadpacman-ed4032a90813ba29ee11c71ac6af3090d96789ce.tar.xz
pacman-db-upgrade: fix issue with find argument list length overflow
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/pacman-db-upgrade.sh.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upgrade.sh.in
index 2fced9be..7bb277b9 100644
--- a/scripts/pacman-db-upgrade.sh.in
+++ b/scripts/pacman-db-upgrade.sh.in
@@ -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...")"