summaryrefslogtreecommitdiff
path: root/db-functions
diff options
context:
space:
mode:
Diffstat (limited to 'db-functions')
-rw-r--r--db-functions10
1 files changed, 6 insertions, 4 deletions
diff --git a/db-functions b/db-functions
index a0b20cd..deaa008 100644
--- a/db-functions
+++ b/db-functions
@@ -509,12 +509,13 @@ arch_repo_add() {
local arch=$2
local pkgs=("${@:3}")
+ printf -v pkgs_str -- '%q ' "${pkgs[@]}"
# package files might be relative to repo dir
pushd "${FTP_BASE}/${repo}/os/${arch}" >/dev/null
/usr/bin/repo-add -q "${repo}${DBEXT}" "${pkgs[@]}" >/dev/null \
- || error '%s' "repo-add ${repo}${DBEXT} ${pkgs[*]}"
+ || error 'repo-add %q %s' "${repo}${DBEXT}" "${pkgs_str% }"
/usr/bin/repo-add -f -q "${repo}${FILESEXT}" "${pkgs[@]}" \
- || error '%s' "repo-add -f ${repo}${FILESEXT} ${pkgs[*]}"
+ || error 'repo-add -f %q %s' "${repo}${FILESEXT}" "${pkgs_str% }"
popd >/dev/null
set_repo_permission "${repo}" "${arch}"
@@ -532,10 +533,11 @@ arch_repo_remove() {
error "No database found at '%s'" "${dbfile}"
return 1
fi
+ printf -v pkgs_str -- '%q ' "${pkgs[@]}"
/usr/bin/repo-remove -q "${dbfile}" "${pkgs[@]}" >/dev/null \
- || error '%s' "repo-remove ${dbfile} ${pkgs[*]}"
+ || error 'repo-remove %q %s' "${dbfile}" "${pkgs_str% }"
/usr/bin/repo-remove -q "${filesfile}" "${pkgs[@]}" \
- || error '%s' "repo-remove ${filesfile} ${pkgs[*]}"
+ || error 'repo-remove %q %s' "${filesfile}" "${pkgs_str% }"
set_repo_permission "${repo}" "${arch}"
REPO_MODIFIED=1