Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3185096pxv; Mon, 12 Jul 2021 11:18:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxF0PiFEYCu43tAhYDZNqb6PrhXcWGcC6NCIjUal1Dxw3c5nVtM3dhCFHYu8D2SN5PhOHe8 X-Received: by 2002:a17:906:844d:: with SMTP id e13mr379368ejy.503.1626113885459; Mon, 12 Jul 2021 11:18:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626113885; cv=none; d=google.com; s=arc-20160816; b=mmCaQy7u6tlmvYYWQVCgu19a4iDp5jXWM4IhwE1iyowfyXljcJkjx1o6axskPRUGlb FqnMi2GkduEHc6vV5e4C4QujUnTIK663/1KsmGNOsuD7i4HzVSEOpSFoqGWlHJjUfook 4V/cwL3PQ7bNh62/GeyXqCoJNC8x+n3H1ZaYa6amOk0d1Rt5BWwk0ZY9cQUyJNxx+nar YIiLxN8EsN+ueOn4d+3gNLOGoq/ohKyO256jzpvEKRkh4k0M3/UPuEIZwg2FVOXiCLWa q96DUtp9Xlf+crYfZJuvLyP264YcravoBVs3XAby8bxZaLFvF5qQ2irqxRgsbPCBc9i0 UWhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DqWT4fDE3hAHFkqfwbERf0a5gSU0GDDeDi7gSH5M3RQ=; b=Fc+HYf2tIfh3hjvMlyoZIkz7EnEJbwStEPtt6qLQvho75YXmRobc93UE5EIMRLRezw 34ZJSzBJdXh/61aFIyyR5G2CcrYaeaBW7RCCVqWi78dShiPUMpWsEbrhE8Aball2DoZh otqnBpvWVJvFIjB3VQBdjkq4/rUy+hiIEclDw/lxOpZyNbe70wzN79MgG30tXRCwl05L 2a4lG0Ct6s7X1A+9d0G396WE+zt2cA1k88uhXET3kfZEnURvN4isqdDP/OZcw3hXGodB 0RzN7iw7DsSe0phK5Pof/Ez5LpwNOkA9d/1FK6xJpSqzNjcjwjv2KWDXkxa4tdqPC8Rk zdlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OO2DSsoH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h8si19921262ejj.750.2021.07.12.11.17.42; Mon, 12 Jul 2021 11:18:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OO2DSsoH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235865AbhGLSSE (ORCPT + 99 others); Mon, 12 Jul 2021 14:18:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:37822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbhGLSSA (ORCPT ); Mon, 12 Jul 2021 14:18:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8B5F761186; Mon, 12 Jul 2021 18:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626113712; bh=gq7Gbfe/DF/YFmB5sXvkMNdWDw5S8T65Rj5JXhLq0nQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OO2DSsoHZWs6Y4MyFGI3+yqQMH/3HcdIScUavVZd/k/WT7zRxPW1TPC2HkctHpeGi dr582GU0I3fzs09mUhGAAZRGzcbN9qnJstRB/425PNmsisAKoC/ZCohYjhGUWSXrUl kjtk+vEz0MrUGYx6OARpvyrFRig9pjvd4P0iYk0w= Date: Mon, 12 Jul 2021 20:15:09 +0200 From: Greg Kroah-Hartman To: Mikulas Patocka Cc: Masahiro Yamada , Nico Schottelius , linux-kernel@vger.kernel.org Subject: Re: [PATCH] scripts/setlocalversion: fix a bug when LOCALVERSION is empty Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 12, 2021 at 10:00:59AM -0400, Mikulas Patocka wrote: > The patch 042da426f8ebde012be9429ff705232af7ad7469 > ("scripts/setlocalversion: simplify the short version part") reduces the > indentation. Unfortunatelly, it also changes behavior in a subtle way - if > the user has empty "LOCALVERSION" variable, the plus sign is appended to > the kernel version. It wasn't appended before. > > This patch reverts to the old behavior - we append the plus sign only if > the LOCALVERSION variable is not set. > > Signed-off-by: Mikulas Patocka > Fixes: 042da426f8eb ("scripts/setlocalversion: simplify the short version part") > > --- > scripts/setlocalversion | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux-2.6/scripts/setlocalversion > =================================================================== > --- linux-2.6.orig/scripts/setlocalversion 2021-07-12 15:29:07.000000000 +0200 > +++ linux-2.6/scripts/setlocalversion 2021-07-12 15:50:29.000000000 +0200 > @@ -131,7 +131,7 @@ res="${res}${CONFIG_LOCALVERSION}${LOCAL > if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then > # full scm version string > res="$res$(scm_version)" > -elif [ -z "${LOCALVERSION}" ]; then > +elif [ "${LOCALVERSION+set}" != "set" ]; then That's really subtle, can you add a comment here that this handles an empty file? thanks, greg k-h