The commit 042da426f8eb ("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.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -131,11 +131,14 @@ res="${res}${CONFIG_LOCALVERSION}${LOCALVERSION}" · 130 unmodified lines | |||
| 131 | if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then | 131 | if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then |
| 132 | # full scm version string | 132 | # full scm version string |
| 133 | res="$res$(scm_version)" | 133 | res="$res$(scm_version)" |
| 134 | elif [ -z "${LOCALVERSION}" ]; then | 134 | elif [ "${LOCALVERSION+set}" != "set" ]; then |
| 135 | # append a plus sign if the repository is not in a clean | 135 | # If the variable LOCALVERSION is not set, append a plus |
| 136 | # annotated or signed tagged state (as git describe only | 136 | # sign if the repository is not in a clean annotated or |
| 137 | # looks at signed or annotated tags - git tag -a/-s) and | 137 | # signed tagged state (as git describe only looks at signed |
| 138 | # LOCALVERSION= is not specified | 138 | # or annotated tags - git tag -a/-s). |
| 139 | # | ||
| 140 | # If the variable LOCALVERSION is set (including being set | ||
| 141 | # to an empty string), we don't want to append a plus sign. | ||
| 139 | scm=$(scm_version --short) | 142 | scm=$(scm_version --short) |
| 140 | res="$res${scm:++}" | 143 | res="$res${scm:++}" |
| 141 | fi | 144 | fi |