From b181db406935de65aedc0d918ca3decaead4eb46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= Date: Thu, 17 Nov 2016 04:01:07 +0100 Subject: [PATCH] Improve fix against -dirty string in make kernelrelease Do not remove .git directory because it cause successive call to makepkg to not work. Use .scmversion file instead. --- PKGBUILD | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 1fdb521..62f1f80 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -36,14 +36,15 @@ prepare() { msg2 'Setting kernel suffix' sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${pkgname#linux*}\"|g" .config - # remove git informations - # these info will be used by make kernelrelease and produce wrong information - # because ownership has fakely be changed by fakeroot during packaging. - rm -rf .git - # define current build version msg2 'Setting kernel build version' echo "$(($pkgrel - 1 ))" > .version + + # no scm version + # this prevent an issue with “make kernelrelease” which add -dirty to version + # because ownership of git files has fakely been changed by fakeroot when + # called from makepkg + echo '' > .scmversion } build() { -- GitLab