Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant cache_dirs, fix read only cache_dirs issue #58

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove local repository from $cache_dirs
Prevent using local repository as pacman cache
bartus committed Mar 4, 2021
commit 7b7bdb8fd3cb2b563952cacdbd5bbf47f17f0014
4 changes: 3 additions & 1 deletion arch-nspawn.in
Original file line number Diff line number Diff line change
@@ -81,7 +81,9 @@ while read -r line; do
for line in "${lines[@]}"; do
if [[ $line = file://* ]]; then
line=${line#file://}
in_array "$line" "${cache_dirs[@]}" || extra_cache_dirs+=("$line")
extra_cache_dirs+=("$line")
in_array "$line" "${cache_dirs[@]}" && \
mapfile -d $'\0' -t cache_dirs < <(printf '%s\0' "${cache_dirs[@]}" | grep -zvFx "$line")
fi
done
done < <($pacconf_cmd --config "${pac_conf:-$working_dir/etc/pacman.conf}" --repo-list)