From b4eb9d2dcda28b0107b0bde28f4f4426bb08af05 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 14 Feb 2018 23:48:30 +0100 Subject: bin/get-assignment: do not use next_sub_pkgrel, but take info straight from database --- bin/common-functions | 64 ---------------------------------------------------- 1 file changed, 64 deletions(-) (limited to 'bin/common-functions') diff --git a/bin/common-functions b/bin/common-functions index 3a03d27..bc43686 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -1237,70 +1237,6 @@ print_list_of_archaic_packages() { sort -u } -# next_sub_pkgrel $package $git_revision $mod_git_revision $repository -# giv out the next sub-pkgrel of the given package - -next_sub_pkgrel() { - ( # new shell is intentional - package="$1" - git_revision="$2" - mod_git_revision="$3" - repository="$4" - git_repo=$(find_git_repository_to_package_repository "${repository}") - - temp_dir=$(mktemp -d 'tmp.common-functions.next_sub_pkgrel.XXXXXXXXXX' --tmpdir) - trap 'rm -rf --one-file-system "${temp_dir}"' EXIT - - find_pkgbuilds "${package}" "${repository}" "${git_repo}" "${git_revision}" "${mod_git_revision}" - extract_source_directory "${git_repo}" "${git_revision}" "${mod_git_revision}" "${temp_dir}" '0' - - version=$( - cd "${temp_dir}" - makepkg --printsrcinfo | \ - sed -n ' - /^\s*\(epoch\|pkg\(name\|ver\|rel\)\) = /{s|^\s\+||;p} - ' | \ - sed ' - /^pkgname = /{ - s/^.*= // - w pkgnames - d - } - s|^epoch = \(.*\)$|1 \1:| - s|^pkgver = \(.*\)$|2 \1-| - s|^pkgrel = \([^.]*\)\(\..*\)\?$|3 \1| - ' | \ - sort -k1n,1 | \ - sed ' - s|^[0-9] || - :a - N - s|\n[0-9] \(\S\+\)$|\1| - ta - ' - ) - sub_pkgrel=$( - ls_master_mirror 'i686/*/' | \ - sed -n "$( - sed ' - s/$/-'"${version}"'/ - s/\./\\./g - s/^/^/ - s/$/\\(\\.\\([0-9]\\+\\)\\)\\?-[^-]\\+$/ - s|^.*$|/\0/{ s/\0/\\2/; s/^$/0/; p; b; }| - ' "${temp_dir}/pkgnames" - )" | \ - sort -n | \ - tail -n1 - ) - if [ -z "${sub_pkgrel}" ]; then - echo '0' - else - echo "$((sub_pkgrel+1))" - fi - ) -} - # modification_revision_link "${mod_rev}" "${repo}" "${pkg}" # print the given modification revision possibly with a html link to github -- cgit v1.2.3-70-g09d2