Message ID | 20181031093552.30483-1-michael.straube@posteo.de |
---|---|
State | Accepted, archived |
Headers | show
Return-Path: <arch-projects-bounces@archlinux.org> Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id 0A9C48006BD7 for <patchwork@archlinux.org>; Wed, 31 Oct 2018 09:36:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on apollo X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00=-1, DKIMWL_WL_HIGH=-0.344,DKIM_SIGNED=0.1,DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-BL-Results: <dns:70.91.198.88.list.dnswl.org> [127.0.9.2] Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by apollo.archlinux.org (Postfix) with ESMTPS for <patchwork@archlinux.org>; Wed, 31 Oct 2018 09:36:18 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id A5D55E731E1E2; Wed, 31 Oct 2018 09:36:17 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS; Wed, 31 Oct 2018 09:36:17 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 81C3528068; Wed, 31 Oct 2018 09:36:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1540978577; bh=GyB0oqlnkd718YzUmOhOq2qyD3NQLjdO+wwb07ws/Wk=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc; b=BtGMIR5IJA2RF0jKv4L2dj0XAUqXurOLoUttfoxTCtAqs9N1mhHZMa+iX16P+0nIg MGrGOK/X4VK53rtKSsyfc7WxYRbsVkBqkB/R8VoSnGgd1yf/av+INSibWVR6O3L2F/ V2iQ/0jNb8grMCwk4gT+O0V4gdioOUMH4uAuNqLPJ6F3pW4JQ25mzySn0O+IHXmZ77 iYxGGOKyE80aBb3AU/oR1RJ3VMp/06Pu3JRobMO8qfIT5C7EUXBDptvSIIZH0+qnL+ pVJjO7hOa7y5eS1KqPWn/cqWBxwBRouoM3BLPSATiHIuichNRp7C4LQIo++o8Leb5M 0dLV62hFVRlmTjm4/roOWYqf1Hn/KjCzBSlNQTjkfyHEJBGYyP8BzKWYaJX4umZvGK lgql5fP9640PWvftUN0o89CdsMoFISZh2vT65ECxYD3cC9/trNR37IuWXdJTtdqRTI kOhrPqwfEDNiNQb3rnKLM/IkcE1+d+BMIcq4zS8QKDambXSFz1cVwHmek2a39wbRmj iA0k7z/ebhpjOOC4Ddr1qf0I4ZJopM24P+liOaXXbZf4AYsz2aZVwsc14dX/JOEgF4 +vomLLi7IWmwMsSwtIQD+FspxgGsxInZNeLnMF2QRxTSmhqJDrmOrqmI9iIue0LklG tuyHBZDRfFQkvLQnEnXP2g0E= Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 9854928068 for <arch-projects@lists.archlinux.org>; Wed, 31 Oct 2018 09:36:14 +0000 (UTC) Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by luna.archlinux.org (Postfix) with ESMTPS for <arch-projects@lists.archlinux.org>; Wed, 31 Oct 2018 09:36:14 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 7E704E731E1DD for <arch-projects@archlinux.org>; Wed, 31 Oct 2018 09:36:11 +0000 (UTC) Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS for <arch-projects@archlinux.org>; Wed, 31 Oct 2018 09:36:11 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 44B2B2400E6 for <arch-projects@archlinux.org>; Wed, 31 Oct 2018 10:36:10 +0100 (CET) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 42lNWF48fCz9rxS; Wed, 31 Oct 2018 10:36:09 +0100 (CET) To: arch-projects@archlinux.org Date: Wed, 31 Oct 2018 10:35:52 +0100 Message-Id: <20181031093552.30483-1-michael.straube@posteo.de> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [arch-projects] [namcap] [PATCH] parsepkgbuild.sh: fix detection of split pkgbuilds with empty pkgbase X-BeenThere: arch-projects@archlinux.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Arch Linux projects development discussion <arch-projects.archlinux.org> List-Unsubscribe: <https://lists.archlinux.org/options/arch-projects>, <mailto:arch-projects-request@archlinux.org?subject=unsubscribe> List-Archive: <https://lists.archlinux.org/pipermail/arch-projects/> List-Post: <mailto:arch-projects@archlinux.org> List-Help: <mailto:arch-projects-request@archlinux.org?subject=help> List-Subscribe: <https://lists.archlinux.org/listinfo/arch-projects>, <mailto:arch-projects-request@archlinux.org?subject=subscribe> From: Michael Straube via arch-projects <arch-projects@archlinux.org> Reply-To: Arch Linux projects development discussion <arch-projects@archlinux.org> Cc: Michael Straube <michael.straube@posteo.de> Errors-To: arch-projects-bounces@archlinux.org Sender: "arch-projects" <arch-projects-bounces@archlinux.org> |
diff --git a/parsepkgbuild.sh b/parsepkgbuild.sh index a158d1e..d85574d 100644 --- a/parsepkgbuild.sh +++ b/parsepkgbuild.sh @@ -140,7 +140,8 @@ compgen -A variable } # is it a split pkgbuild ? -if [ -n "${pkgbase}" ]; then +if [ "${#pkgname[@]}" -gt 1 ]; then + pkgbase=${pkgbase:-${pkgname[0]}} _namcap_pkgnames=(${pkgname[@]}) unset pkgname echo -e "%SPLIT%\n1\n"
For split pkgbuilds the pkgbase variable is optional. If not specified, the first element in the pkgname array is used. Currently parsepkgbuild.sh fails to detect split pkgbuilds if pkgbase is not specified. Therefore the split pkgbuild rules are not applied to such pkgbuilds. Instead of testing if pkgbase is set, test if the pkgname array has more than one element. If so, set pkgbase accordingly. Signed-off-by: Michael Straube <michael.straube@posteo.de> --- parsepkgbuild.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)