nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] build: ignore errors from `git describe`


From: Benno Schulenberg
Subject: Re: [PATCH] build: ignore errors from `git describe`
Date: Fri, 10 Jun 2022 16:48:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

Op 09-06-2022 om 14:00 schreef LIU Hao:
> Since Git 2.35.2, a user who builds nano from Git as a normal user then 
> installs
> it with `sudo make install` could get a blank version string in the titlebar.

Yes, I noticed this while making the last release, and worked around it quickly
as git suggested, so I haven't seen the problem since.  But indeed, it's better
to avoid bothering the user with this.  Thanks for the patch.

(Although... the built nano would then use the version number from config.h
if the user were to skip the plain 'make' step.  Not too bad, but... not what
is intended either.)

> -     @echo "#define $(SOMETHING)" | cmp -s $@ - || \
> +     @! git describe 2>/dev/null || \
> +                     echo "#define $(SOMETHING)" | cmp -s $@ - || \
>                       echo "#define $(SOMETHING)" > $@

Redirecting only stderr interleaves the regular output of `git describe` (if 
any)
in the build output.  Not harmful, but better not.  So I suggest:

        @! git describe >/dev/null 2>&1 || \

Are you okay with that change?

Benno

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]