From b8df7a8b87508d851b46c0078b73727e2c346190 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 4 Jul 2017 21:57:07 +0200 Subject: bin/common-functions, bin/db-update, bin/return-assignment: recognize build-support as untested, unstaged repository --- bin/common-functions | 16 ++++++++++++---- bin/db-update | 12 ++++++++---- bin/return-assignment | 8 +++++--- 3 files changed, 25 insertions(+), 11 deletions(-) (limited to 'bin') diff --git a/bin/common-functions b/bin/common-functions index 25c592f..8f223ca 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -238,13 +238,21 @@ repository_of_package() { esac } -# official_or_community $package.$repo_revision.$mod_repo_revision.$repository +# official_or_community $package.$repo_revision.$mod_repo_revision.$repository $ending # print wether the specified package is an official package (print -# nothing) or a community package (print 'community-') +# $ending) or a community package (print 'community-$ending') or a +# build-suppor package (print 'build-support') official_or_community() { - if [ "$(repository_of_package "$1")" = 'community' ]; then - echo 'community-' + local prepo + prepo="$(repository_of_package "$1")" + + if [ "${prepo}" = 'community' ]; then + echo 'community-'"$2" + elif [ "${prepo}" = 'build-support' ]; then + echo 'build-support' + else + echo "$2" fi } diff --git a/bin/db-update b/bin/db-update index e1e785a..97ca393 100755 --- a/bin/db-update +++ b/bin/db-update @@ -558,7 +558,10 @@ move_packages $( continue fi - printf '%s/%s/%s\n' "${package}" "$(official_or_community ${package})testing" "$(repository_of_package "${package}")" + printf '%s/%s/%s\n' \ + "${package}" \ + "$(official_or_community "${package}" 'testing')" \ + "$(repository_of_package "${package}")" done @@ -574,9 +577,10 @@ move_packages $( continue fi - is_community="$(official_or_community "${package}")" - - printf '%s/%s/%s\n' "${package}" "${is_community}staging" "${is_community}testing" + printf '%s/%s/%s\n' \ + "${package}" \ + "$(official_or_community "${package}" 'staging')" \ + "$(official_or_community "${package}" 'testing')" done diff --git a/bin/return-assignment b/bin/return-assignment index 345abf2..a7ab92f 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -179,7 +179,7 @@ if [ -n "${package_errors}" ]; then fi # move packages -destination="$(official_or_community "$1.$2.$3.$4")staging" +destination="$(official_or_community "$1.$2.$3.$4" 'staging')" ${master_mirror_rsync_command} \ "${master_mirror_rsync_directory}/i686/${destination}/${destination}.db."* \ @@ -223,8 +223,10 @@ fi sed -i "/^$(str_to_regex "$1 $2 $3 $4")\$/d" "${work_dir}/build-list" # remove package lock file -printf '%s\n' ${packages} > \ - "${work_dir}/package-states/$1.$2.$3.$4.done" +if ! [ "${destination}" = 'build-support' ]; then + printf '%s\n' ${packages} > \ + "${work_dir}/package-states/$1.$2.$3.$4.done" +fi rm -f \ "${work_dir}/package-states/$1.$2.$3.$4.locked" \ "${work_dir}/package-states/$1.$2.$3.$4.broken" -- cgit v1.2.3-54-g00ecf