diff options
author | Erich Eckner <git@eckner.net> | 2017-11-27 19:22:58 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-11-27 19:22:58 +0100 |
commit | 9d53151ff94f3c0dbef5d9d6a2c77cbe7bc7f63a (patch) | |
tree | 9613f00e5b61bdda43adda27b79c2ae61ed21e44 | |
parent | 6d7903da7b3e15edf9ab8e63335d3169c71c2651 (diff) | |
download | builder-9d53151ff94f3c0dbef5d9d6a2c77cbe7bc7f63a.tar.xz |
bin/common-functions: find_package_repository_to_package: bugfix if git_repository is archlinux32
-rwxr-xr-x | bin/common-functions | 29 |
1 files 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 |