From 9d53151ff94f3c0dbef5d9d6a2c77cbe7bc7f63a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 27 Nov 2017 19:22:58 +0100 Subject: bin/common-functions: find_package_repository_to_package: bugfix if git_repository is archlinux32 --- bin/common-functions | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/bin/common-functions b/bin/common-functions index 44ae307..f931990 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -746,16 +746,25 @@ find_package_repository_to_package() { eval 'repo_path="${repo_paths__'"${git_repository}"'}"' - repo=$( - git -C "${repo_path}" archive "${git_commit}" -- "${package}/repos" 2> /dev/null | \ - tar -t | \ - cut -d/ -f3 | \ - grep -vxF '' | \ - grep -v 'staging\|testing\|-unstable' | \ - grep -v -- '-i686$' | \ - sed 's|-[^-]\+$||' | \ - sort -u - ) + if [ "${git_repository}" = 'archlinux32' ]; then + repo=$( + git -C "${repo_path}" archive "${git_commit}" -- | \ + tar -t --wildcards "*/${package}/" | \ + cut -d/ -f1 | \ + sort -u + ) + else + repo=$( + git -C "${repo_path}" archive "${git_commit}" -- "${package}/repos" 2> /dev/null | \ + tar -t | \ + cut -d/ -f3 | \ + grep -vxF '' | \ + grep -v 'staging\|testing\|-unstable' | \ + grep -v -- '-i686$' | \ + sed 's|-[^-]\+$||' | \ + sort -u + ) + fi if [ -z "${repo}" ]; then return 1 -- cgit v1.2.3-70-g09d2