mirror of
git://git.yoctoproject.org/meta-freescale.git
synced 2025-10-22 14:52:19 +02:00
Merge pull request #1694 from dwagenk/deterministic-localversion
classes: make localversion classes deterministic
This commit is contained in:
commit
0fc1504fb3
|
@ -25,8 +25,9 @@ do_kernel_localversion() {
|
|||
|
||||
if [ "${SCMVERSION}" = "y" ]; then
|
||||
# Add GIT revision to the local version
|
||||
head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null`
|
||||
printf "%s%s" +g $head > ${S}/.scmversion
|
||||
head=`git --git-dir=${S}/.git rev-parse --verify --short ${SRCREV} 2> /dev/null`
|
||||
patches=`git --git-dir=${S}/.git rev-list --count ${SRCREV}..HEAD 2> /dev/null`
|
||||
printf "%s%s%s%s" +g $head +p $patches > ${S}/.scmversion
|
||||
|
||||
sed -i -e "/CONFIG_LOCALVERSION_AUTO[ =]/d" ${B}/.config
|
||||
echo "CONFIG_LOCALVERSION_AUTO=y" >> ${B}/.config
|
||||
|
|
|
@ -17,9 +17,10 @@ UBOOT_LOCALVERSION = "${LOCALVERSION}"
|
|||
do_compile:prepend() {
|
||||
if [ "${SCMVERSION}" = "y" ]; then
|
||||
# Add GIT revision to the local version
|
||||
head=`cd ${S} ; git rev-parse --verify --short HEAD 2> /dev/null`
|
||||
printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${S}/.scmversion
|
||||
printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${B}/.scmversion
|
||||
head=`cd ${S} ; git rev-parse --verify --short ${SRCREV} 2> /dev/null`
|
||||
patches=`cd ${S} ; git rev-list --count ${SRCREV}..HEAD 2> /dev/null`
|
||||
printf "%s%s%s%s%s" "${UBOOT_LOCALVERSION}" +g $head +p $patches > ${S}/.scmversion
|
||||
printf "%s%s%s%s%s" "${UBOOT_LOCALVERSION}" +g $head +p $patches > ${B}/.scmversion
|
||||
else
|
||||
printf "%s" "${UBOOT_LOCALVERSION}" > ${S}/.scmversion
|
||||
printf "%s" "${UBOOT_LOCALVERSION}" > ${B}/.scmversion
|
||||
|
|
Loading…
Reference in New Issue
Block a user