diff --git a/srcpkgs/kernel-snapshot/template b/srcpkgs/kernel-snapshot/template index 5cf9e3a071..7d582db9fc 100644 --- a/srcpkgs/kernel-snapshot/template +++ b/srcpkgs/kernel-snapshot/template @@ -58,9 +58,8 @@ do_configure() { msg_normal "Defaulting to 'defconfig and allmodconfig'.\n" make ${makejobs} defconfig && make ${makejobs} allmodconfig fi - if [ -n "${revision}" ]; then - sed -i -e "s|\(LOCALVERSION\)=\"\"|\1=\"_${revision}\"|" .config - fi + # Always use our revision to CONFIG_LOCALVERSION to match our pkg version. + sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config } do_build() { diff --git a/srcpkgs/kernel/template b/srcpkgs/kernel/template index 1868160f64..b6f5f1f414 100644 --- a/srcpkgs/kernel/template +++ b/srcpkgs/kernel/template @@ -53,9 +53,8 @@ do_configure() { msg_normal "Defaulting to 'defconfig and allmodconfig'.\n" make ${makejobs} defconfig && make ${makejobs} allmodconfig fi - if [ -n "${revision}" ]; then - sed -i -e "s|\(LOCALVERSION\)=\"\"|\1=\"_${revision}\"|" .config - fi + # Always use our revision to CONFIG_LOCALVERSION to match our pkg version. + sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config } do_build() {