From patchwork Thu Jul 15 08:42:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 112205 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6F8g027026805 for ; Thu, 15 Jul 2010 08:42:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932702Ab0GOImb (ORCPT ); Thu, 15 Jul 2010 04:42:31 -0400 Received: from cantor.suse.de ([195.135.220.2]:51847 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932643Ab0GOIma (ORCPT ); Thu, 15 Jul 2010 04:42:30 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 894926CB00; Thu, 15 Jul 2010 10:42:29 +0200 (CEST) Received: by sepie.suse.cz (Postfix, from userid 10020) id AAE1760506; Thu, 15 Jul 2010 10:42:33 +0200 (CEST) Date: Thu, 15 Jul 2010 10:42:33 +0200 From: Michal Marek To: "Zheng, Jiajia" Cc: "Guy, Wey-Yi W" , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: "make rpm" failed with parameter "--scm-only" Message-ID: <20100715084233.GA5835@sepie.suse.cz> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 15 Jul 2010 08:42:32 +0000 (UTC) diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 3a681ef..d2c29b6 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -44,7 +44,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE fi $(MAKE) clean $(PREV) ln -sf $(srctree) $(KERNELPATH) - $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --scm-only > $(objtree)/.scmversion + $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/. $(PREV) rm $(KERNELPATH) rm -f $(objtree)/.scmversion diff --git a/scripts/setlocalversion b/scripts/setlocalversion index d6a866e..951b067 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -10,13 +10,13 @@ # usage() { - echo "Usage: $0 [--scm-only] [srctree]" >&2 + echo "Usage: $0 [--save-scmversion] [srctree]" >&2 exit 1 } scm_only=false srctree=. -if test "$1" = "--scm-only"; then +if test "$1" = "--save-scmversion"; then scm_only=true shift fi @@ -131,7 +131,10 @@ collect_files() } if $scm_only; then - scm_version + if test ! -e .scmversion; then + res=$(scm_version) + echo "$res" >.scmversion + fi exit fi