From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8C20C07E95 for ; Tue, 13 Jul 2021 09:10:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9308761375 for ; Tue, 13 Jul 2021 09:10:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234884AbhGMJNo (ORCPT ); Tue, 13 Jul 2021 05:13:44 -0400 Received: from mx.ungleich.ch ([185.203.112.16]:46610 "EHLO smtp.ungleich.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234702AbhGMJNl (ORCPT ); Tue, 13 Jul 2021 05:13:41 -0400 Received: from nb3.localdomain (localhost [IPv6:::1]) by smtp.ungleich.ch (Postfix) with ESMTP id 7B4561FE49; Tue, 13 Jul 2021 11:10:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ungleich.ch; s=mail; t=1626167446; bh=sj+8AfqXxmO5yIytfx3JedpkU6nycxD2GiwxOs6smQQ=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=NE+4V1o/Gy3GeTRvM2MMuUpHrFU6+xcmUN/CW8oX4wFKc2tbR68EpHgD4aSbop5gl ukdmVxN2OVhUKARmE9dVfyn1mcqiuBSAg2ZBeqQ0fxLfvfWmGY/VwqiOt0Hk/UOVXc MdhtnhlA18X4QszY+YFJl/yPWF9sy1Xm+IIoaA47+STk/3byTv8xnE8IfCeBkPLY+4 iH5Kbo8H5NC1wwUYvG8i6nzUYDUb7bzLN2QKq3RIM/yyfupTB9P7SfQ+NbMZUt+Wod MGnPr/nVQp8kW/x3g5SmtVAXl37ZRytefIVKOXr0NE6e+vQc/6L9FTlnKn1KYMye20 Ne/ixfweuzNqw== Received: by nb3.localdomain (Postfix, from userid 1000) id 98E6014C0431; Tue, 13 Jul 2021 11:11:33 +0200 (CEST) References: <87tukzgrkg.fsf@ungleich.ch> User-agent: mu4e 1.4.15; emacs 27.2 From: Nico Schottelius To: Mikulas Patocka Cc: Nico Schottelius , Greg Kroah-Hartman , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] scripts/setlocalversion: fix a bug when LOCALVERSION is empty In-reply-to: Date: Tue, 13 Jul 2021 11:11:33 +0200 Message-ID: <87r1g2h92y.fsf@ungleich.ch> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mikulas Patocka writes: > I set LOCALVERSION to an empty string (with "export LOCALVERSION="). This > prevented the kernel from adding a "+" sign to the kernel version. Since > the commit 042da426f8eb, it no longer works and the kernel adds a "+" sign > if LOCALVERSION is set and empty. > > If you don't like "if [ "${LOCALVERSION+set}" != "set" ]", then please > provide some other way how to test if the variable is set. I fail to see the problem you are solving, as that case works exactly like I wrote in my last mail: [11:09:03] nb3:~$ export LOCALVERSION=; [ -z "${LOCALVERSION}" ] && echo unset unset [11:09:27] nb3:~$ echo $BASH_VERSION 5.1.8(1)-release Did you try that in your environment? -- Sustainable and modern Infrastructures by ungleich.ch