On Thu, Sep 06, 2018 at 10:39:27AM +0200, Alexander Dahl wrote: > From the Git manual: > > --tags > Instead of using only the annotated tags, use any tag found > in refs/tags namespace. This option enables matching a > lightweight (non-annotated) tag. > > This fixes the case for PTXDIST_BSP_AUTOVERSION returning things like > ????.??.?-?-gcb7418a2299c-dirty when the last tag in the BSP was only a > lightweight one, no annotated tag.
Nack. Using only annotated tags is a deliberate choice we made. Changing this would break all kinds of existing use-cases. I think it would be ok to make this optional (opt-in) in the script. And then define a custom ptxd_bsp_autoversion() in your BSP to enable this. Michael > Signed-off-by: Alexander Dahl <[email protected]> > --- > scripts/kernel/setlocalversion | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/scripts/kernel/setlocalversion b/scripts/kernel/setlocalversion > index 3feb87dce..fd852cb26 100755 > --- a/scripts/kernel/setlocalversion > +++ b/scripts/kernel/setlocalversion > @@ -55,12 +55,12 @@ if head=`git ${git_abbrev} rev-parse --verify --short > HEAD 2>/dev/null`; then > > # If we are at a tagged commit (like "ptxdist-2010.05.0"), we > # print it here > - if atag="`git describe --exact-match 2>/dev/null`"; then > + if atag="`git describe --tags --exact-match 2>/dev/null`"; then > echo "$atag" | awk -F- '{printf("%s", $(NF))}' > > # If we are past a tagged commit (like > "ptxdist-2010.03.0-130-g3c60777"), > # we pretty print it. > - elif atag="`git ${git_abbrev} describe 2>/dev/null`"; then > + elif atag="`git ${git_abbrev} describe --tags 2>/dev/null`"; then > echo "$atag" | awk -F- '{printf("%s-%05d-%s", > $(NF-2),$(NF-1),$(NF))}' > > # If we don't have a tag at all we print ????.??.?-?-g{commitish}. > -- > 2.11.0 > > > _______________________________________________ > ptxdist mailing list > [email protected] -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list [email protected]
