From patchwork Fri Aug 4 16:58:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Morey-Chaisemartin X-Patchwork-Id: 9881729 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 08D44604D9 for ; Fri, 4 Aug 2017 16:59:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAE642890C for ; Fri, 4 Aug 2017 16:59:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFB01289E2; Fri, 4 Aug 2017 16:59:43 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3FA8289E8 for ; Fri, 4 Aug 2017 16:59:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752947AbdHDQ7A (ORCPT ); Fri, 4 Aug 2017 12:59:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:35668 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752917AbdHDQ7A (ORCPT ); Fri, 4 Aug 2017 12:59:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 68B03ADE6 for ; Fri, 4 Aug 2017 16:58:59 +0000 (UTC) From: Nicolas Morey-Chaisemartin Subject: [PATCH rdma-core 1/3] cbuild: allow indentation in RPM version To: linux-rdma@vger.kernel.org References: <27366048-d80f-3711-c6cd-93c87809650e@suse.de> Message-ID: Date: Fri, 4 Aug 2017 18:58:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Thunderbird/55.0 MIME-Version: 1.0 In-Reply-To: <27366048-d80f-3711-c6cd-93c87809650e@suse.de> Content-Language: fr-xx-classique+reforme1990 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix support for: Version: with multiple spaces Signed-off-by: Nicolas Morey-Chaisemartin --- buildlib/cbuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildlib/cbuild b/buildlib/cbuild index 888fae6c..efc039bf 100755 --- a/buildlib/cbuild +++ b/buildlib/cbuild @@ -407,11 +407,11 @@ def run_rpm_build(args,spec_file,env): with open(spec_file,"r") as F: for ln in F: if ln.startswith("Version:"): - ver = ln.strip().partition(' ')[2]; + ver = ln.strip().partition(' ')[2].strip(); assert(ver == get_version()); if ln.startswith("Source:"): - tarfn = ln.strip().partition(' ')[2]; + tarfn = ln.strip().partition(' ')[2].strip(); tarfn = tarfn.replace("%{version}",version); image_id = get_image_id(args,env.image_name());