From 473bfa06f334069487ed2663371818c5b4fda52c Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 15 Dec 2011 23:50:32 +0100 Subject: [PATCH] use architecture specific reprepro removal command for non-arch-all packages Thanks: Alexander Wirt --- scripts/build-and-provide-package | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/build-and-provide-package b/scripts/build-and-provide-package index de7035f..80f4cae 100755 --- a/scripts/build-and-provide-package +++ b/scripts/build-and-provide-package @@ -271,8 +271,14 @@ remove_packages() { binary_list="${binary_list:-} ${binpackage}" # note: "removesrc" would remove foreign arch files (of different builds) - echo "*** Removing existing package ${binpackage} from repository ${REPOS} ***" - ${SUDO_CMD:-} reprepro -v -b "${REPOSITORY}" --waitforlock 1000 remove "${REPOS}" "${binpackage}" + if echo "$file" | egrep -q '_all.deb$'; then + echo "*** Removing existing package ${binpackage} from repository ${REPOS} ***" + ${SUDO_CMD:-} reprepro -v -b "${REPOSITORY}" --waitforlock 1000 remove "${REPOS}" "${binpackage}" + else + echo "*** Removing existing package ${binpackage} from repository ${REPOS} for arch ${ARCH} ***" + ${SUDO_CMD:-} reprepro -v -A "${ARCH}" -b "${REPOSITORY}" --waitforlock 1000 remove "${REPOS}" "${binpackage}" + fi + done }