From patchwork Wed Nov 29 17:11:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 10082853 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 31C866020B for ; Wed, 29 Nov 2017 17:11:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19F9629B65 for ; Wed, 29 Nov 2017 17:11:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F14A29B9F; Wed, 29 Nov 2017 17:11:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E054D29B65 for ; Wed, 29 Nov 2017 17:11:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1649520359E97; Wed, 29 Nov 2017 09:06:41 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=vishal.l.verma@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D940E221660EE for ; Wed, 29 Nov 2017 09:06:39 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2017 09:11:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.45,338,1508828400"; d="scan'208"; a="1249956872" Received: from vverma7-desk.lm.intel.com (HELO vverma7-desk2.amr.corp.intel.com) ([10.232.112.218]) by fmsmga002.fm.intel.com with ESMTP; 29 Nov 2017 09:11:03 -0800 From: Vishal Verma To: Subject: [ndctl PATCH v2] rpmbuild: check for rpmbuild working directories Date: Wed, 29 Nov 2017 10:11:00 -0700 Message-Id: <20171129171100.6654-1-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.14.3 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP The rpmbuild and make-git-snapshot assume that the various ~/rpmbuild/* directories are present. In case they weren't, git-archive would fail with something like: /root/rpmbuild/SOURCES/ndctl-58.2.38.g8ad8f4c.tar.gz: No such file or directory Add a check to make sure they are present, and exit out with a relevant message. Cc: Dan Williams Signed-off-by: Vishal Verma --- rpmbuild.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/rpmbuild.sh b/rpmbuild.sh index 4535b46..fe4154b 100755 --- a/rpmbuild.sh +++ b/rpmbuild.sh @@ -1,5 +1,6 @@ #!/bin/bash pushd $(dirname $0) >/dev/null +[ ! -d ~/rpmbuild/SOURCES ] && echo "rpmdev tree not found" && exit 1 ./make-git-snapshot.sh popd > /dev/null rpmbuild -ba $(dirname $0)/rhel/ndctl.spec