lkml.org 
[lkml]   [2023]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH kernel] kbuild: get rid of unwanted "+" when CONFIG_LOCALVERSION is set
From

On 20/9/23 23:30, Alexey Kardashevskiy wrote:
>
> On 20/9/23 21:59, Masahiro Yamada wrote:
>> On Wed, Sep 20, 2023 at 10:56 AM Alexey Kardashevskiy <aik@amd.com>
>> wrote:
>>>
>>> The scripts/setlocalversion script correctly tries not adding "+" when
>>> CONFIG_LOCALVERSION is defined.
>>
>> I am afraid you are misunderstanding the script.
>
> Possibly :) I should have read of "+set"... sorry :-/ Thanks for
> spending time looking at this.
>
>> CONFIG_LOCALVERSION and the "+" sign is unrelated.
>
> How come?
>
> scripts/setlocalversion -> if [ "${LOCALVERSION+set}" != "set" ] ->
> scm_version --short -> echo "+".
>
> Where is that LOCALVERSION supposed to come from, and when? Is not
> LOCALVERSION related to CONFIG_LOCALVERSION?
>
>>> However, instead of grepping for it
>>> (as it is done for CONFIG_LOCALVERSION_AUTO=y), it relies on
>>> LOCALVERSION
>>> set in the shell which is not.
>>>
>>> Export LOCALVERSION so scripts/setlocalversion could see it and not add
>>> unwanted "+" at the end of the kernelrelease.
>>>
>>> Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
>>
>>
>> So, scripts/setlocalversion will always see
>> defined LOCALVERSION.
>>
>> With your patch, LOCALVERSION would be set to an empty value,
>> which would make the following condition always false.
>>
>> elif [ "${LOCALVERSION+set}" != "set" ]; then
>>
>>
>> Your patch is equivalent to deleting
>> line 175-183 of scripts/setlocalversion.
>>
>> Of course, that is wrong and unacceptable.
>
> Ok. What is the right way of getting rid of the "+"? Thanks,


make LOCALVERSION="" ...
seems to be the only way, is that right? I thought CONFIG_LOCALVERSION
is good enough for not having "+", hmm.


--
Alexey

\
 
 \ /
  Last update: 2023-09-22 03:00    [W:0.075 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site