From e960e11bfb0d74cf545595ebfabe4965e3a5b1ed Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 25 May 2015 01:52:20 -0600 Subject: Backport simple changes from the lukeshu/cleanup+xbs2+stuff branch - db-move: rename dir_to to xbsrepo_to - db-move: fix typo in comment - db-move: add a diagnostic message - db-remove: wrap a line --- db-move | 9 +++++---- db-remove | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/db-move b/db-move index f48ce4f..89a0ad6 100755 --- a/db-move +++ b/db-move @@ -64,17 +64,18 @@ for pkgbase in "${args[@]:2}"; do arches=($(xbs move "${repo_from}" "${repo_to}" "${pkgbase}")) # move the package in ftp for pkgarch in "${arches[@]}"; do - dir_to="$(xbs releasepath "$pkgbase" "$repo_to" "$pkgarch")" - if true; then # to add in indent level to make merging easier + xbsrepo_to="$(xbs releasepath "$pkgbase" "$repo_to" "$pkgarch")" + if true; then # to add an indent level to make merging easier if [ "${pkgarch}" == 'any' ]; then tarches=("${ARCHES[@]}") else tarches=("${pkgarch}") fi - pkgnames=($(. "${dir_to}/PKGBUILD"; echo "${pkgname[@]}")) + msg2 "%s (%s)" "${pkgbase}" "${tarches[*]}" + pkgnames=($(. "${xbsrepo_to}/PKGBUILD"; echo "${pkgname[@]}")) for pkgname in "${pkgnames[@]}"; do - pkgver=$(. "${dir_to}/PKGBUILD"; get_full_version "${pkgname}") + pkgver=$(. "${xbsrepo_to}/PKGBUILD"; get_full_version "${pkgname}") for tarch in "${tarches[@]}"; do pkgpath=$(getpkgfile "${ftppath_from}/${tarch}/${pkgname}-${pkgver}-${pkgarch}"${PKGEXT}) pkgfile="${pkgpath##*/}" diff --git a/db-remove b/db-remove index f761f22..dcbe4b4 100755 --- a/db-remove +++ b/db-remove @@ -35,7 +35,8 @@ for pkgbase in "${pkgbases[@]}"; do remove_pkgs+=($(. "$path/PKGBUILD"; echo "${pkgname[@]}")) xbs unrelease "$pkgbase" "$repo" "$arch" else - warning "%s not found in %s for %s" "$pkgbase" "$(xbs name)" "$repo-$arch" + warning "%s not found in %s for %s" \ + "$pkgbase" "$(xbs name)" "$repo-$arch" warning "Removing only %s from the repo" "$pkgbase" warning "If it was a split package you have to remove the others yourself!" remove_pkgs+=("$pkgbase") -- cgit v1.2.3