[Buildroot] [PATCH 1/1] setlocalversion: fix detection of hg revision for untagged versions
Peter Korsgaard
peter at korsgaard.com
Mon Jul 3 09:40:36 UTC 2017
>>>>> "Thomas" == Thomas De Schampheleire <thomas.de_schampheleire at nokia.com> writes:
Hi,
>> > Perhaps synching with the kernel would be a better way forward than
>> > adding local modifications?
>> I tried using the latest version from the kernel in Buildroot and
>> notice the following:
>>
>> - the version from the kernel now expects to find
>> include/config/auto.conf and bails out otherwise. Commenting out this
>> test...
>> - the output of that script is now just a + i.e. the actual output
>> of the scm version does not matter. This is due to following code:
>> scm=$(scm_version --short)
>> res="$res${scm:++}"
>>
>> which means: if scm is empty, don't change res -- if scm is not
>> empty, then the literal '+' is appended to res.
>> - if I ignore that point and check the actual content of the 'scm'
>> variable, I notice that this script suffers from the same problem as
>> the buildroot one. My fix solves that aspect also in the kernel
>> script.
>>
>>
>> The kernel script has evolved a lot from the version that Buildroot
>> once took, I don't know if the changes have real value for us.
>> I also assume that the kernel developers will not really want to
>> customize their version of the script to add more configuration
>> switches to tweak the behavior.
>> https://github.com/torvalds/linux/blob/master/scripts/setlocalversion
>>
>> Based on this feedback, how do you think we should proceed?
Sorry for the slow response. I was afraid that the cut option wouldn't
be supported by older versions, but it was apparently added ~20 years
go.
Committed, thanks.
It might still be interesting to submit a similar patch to the Linux
kernel (as you presumably have the same issue there).
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list