Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-22 11:26:15 +0200
committerErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-22 11:26:15 +0200
commit58fb713daca8368b897a87c39c6449cba0f4601f (patch)
tree3e824ca791568910825f9d7d4e87d3ca8e950674 /bin
parent55d6ca33023ad8cbd1420a54ffc1e49e5453e942 (diff)
attempt to fix local-build-package
* it was broken before, don't expect too much
Diffstat (limited to 'bin')
-rwxr-xr-xbin/local-build-package37
1 files changed, 16 insertions, 21 deletions
diff --git a/bin/local-build-package b/bin/local-build-package
index e0b02dc..fca63f2 100755
--- a/bin/local-build-package
+++ b/bin/local-build-package
@@ -153,23 +153,21 @@ if ! ${nobuild}; then
git -C "${repo_path}" pull
done
+ if [ "${arch}" == 'any' ]; then
+ upstream_arch='any'
+ build_arch=$(pacman-conf Architecture)
+ else
+ upstream_arch='x86_64'
+ build_arch="${arch}"
+ fi
+
repository=$1
package=$2
- case $repository in
- core)
- repo_path='../work/repos/packages'
- ;;
- extra)
- repo_path='../work/repos/packages'
- ;;
- community)
- repo_path='../work/repos/community'
- ;;
- *)
- >&2 echo 'Repository is either "core", "extra" or "community"'
- usage
- esac
- git_revision=$(git -C "${repo_path}" rev-parse HEAD)
+ git_revision=$(
+ git -C "${repo_paths__state}" archive HEAD -- "${repository}-${upstream_arch}/${package}" \
+ | tar -Ox \
+ | cut -d' ' -f4
+ )
mod_git_revision=$(git -C "${repo_paths__archlinux32}" stash create)
if [ -z "${mod_git_revision}" ]; then
@@ -177,9 +175,9 @@ if ! ${nobuild}; then
fi
if [[ -z "${straws[:with_build_support:]}" ]]; then
- build_command="staging-${arch}-build"
+ build_command="staging-${build_arch}-build"
else
- build_command='staging-with-build-support-'"${arch}"'-build'
+ build_command='staging-with-build-support-'"${build_arch}"'-build'
fi
parameters="-r ${archbuild_chroots}"
@@ -187,10 +185,7 @@ if ! ${nobuild}; then
parameters='-- -- --nocheck'
fi
- git_repo=$(find_repository_with_commit "${git_revision}")
- find_pkgbuilds "${package}" "${repository}" "${git_repo}" "${git_revision}" "${mod_git_revision}"
-
- extract_source_directory "${git_repo}" "${git_revision}" "${mod_git_revision}" "${tmp_dir}"
+ extract_source_directory "${repository}" "${git_revision}" "${mod_git_revision}" "${tmp_dir}" '0'
rm -f \
./*"-${arch}.pkg.tar.xz" ./*"-${arch}.pkg.tar.xz.sig" \