]> git.baikalelectronics.ru Git - kernel.git/commit
scripts/setlocalversion: fix a bug when LOCALVERSION is empty
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 12 Jul 2021 19:35:46 +0000 (15:35 -0400)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 18 Jul 2021 14:48:14 +0000 (23:48 +0900)
commite8df665d66a3e3bd4090e3d307842ac12d50fd53
tree0b8a2df1f728e0758d8238aaf81ae5f32559fd18
parentb1b49cbcf8bd66059ed6f80c573a7ff83991d8ef
scripts/setlocalversion: fix a bug when LOCALVERSION is empty

The commit 7822fe915091 ("scripts/setlocalversion: simplify the short
version part") reduces indentation. Unfortunately, it also changes behavior
in a subtle way - if the user has empty "LOCALVERSION" variable, the plus
sign is appended to the kernel version. It wasn't appended before.

This patch reverts to the old behavior - we append the plus sign only if
the LOCALVERSION variable is not set.

Fixes: 7822fe915091 ("scripts/setlocalversion: simplify the short version part")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/setlocalversion