[pacman-dev] [PATCH] Add the ability to always build from the repo's HEAD
Techlive Zheng
techlivezheng at gmail.com
Mon May 27 12:08:47 EDT 2013
---
A task has also been added:
https://bugs.archlinux.org/task/35499
scripts/makepkg.sh.in | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index c27c74d..cd7ed48 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -557,6 +557,9 @@ download_git() {
if ! git fetch --all -p; then
# only warn on failure to allow offline builds
warning "$(gettext "Failure while updating %s %s repo")" "${repo}" "git"
+ else
+ git fetch origin HEAD
+ echo "$(git rev-parse FETCH_HEAD)" > HEAD
fi
fi
}
@@ -597,6 +600,9 @@ extract_git() {
branch)
ref=origin/${fragment##*=}
;;
+ HEAD)
+ ref=HEAD
+ ;;
*)
error "$(gettext "Unrecognized reference: %s")" "${fragment}"
plain "$(gettext "Aborting...")"
@@ -604,6 +610,8 @@ extract_git() {
esac
fi
+ ref=$(git rev-parse "$ref")
+
if [[ -n $ref ]]; then
if ! git checkout -b makepkg $ref; then
error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "git"
--
1.8.2.3
More information about the pacman-dev
mailing list