diff --git a/common/hooks/post-install/05-generate-gitrevs.sh b/common/hooks/post-install/05-generate-gitrevs.sh index 938dc710a5b..52dc023a887 100644 --- a/common/hooks/post-install/05-generate-gitrevs.sh +++ b/common/hooks/post-install/05-generate-gitrevs.sh @@ -15,7 +15,7 @@ hook() { fi cd $XBPS_SRCPKGDIR - rev="$(git rev-parse --short HEAD)" + rev="$(chroot-git rev-parse --short HEAD)" echo "${sourcepkg}:${rev}" echo "${sourcepkg}:${rev}" > $GITREVS_FILE } diff --git a/xbps-src b/xbps-src index 05e90539b13..dc3535ee677 100755 --- a/xbps-src +++ b/xbps-src @@ -221,7 +221,7 @@ check_build_requirements() { if [ -z "$XBPS_ALT_REPOSITORY" ]; then pushd "$PWD" &>/dev/null cd $XBPS_DISTDIR - _gitbranch="$(git symbolic-ref --short HEAD 2>/dev/null)" + _gitbranch="$(chroot-git symbolic-ref --short HEAD 2>/dev/null)" if [ -n "${_gitbranch}" -a "${_gitbranch}" != "master" ]; then export XBPS_ALT_REPOSITORY="${_gitbranch}" export XBPS_REPOSITORY="${XBPS_REPOSITORY}/${_gitbranch}"