From patchwork Tue Mar 12 17:01:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Schwartz X-Patchwork-Id: 1038 Return-Path: Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id 7491CC70D6C1 for ; Tue, 12 Mar 2019 17:01:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on apollo X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00=-1, DKIMWL_WL_HIGH=-0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3, T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-BL-Results: [127.0.9.2] Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Tue, 12 Mar 2019 17:01:36 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 5949B11331ABFF; Tue, 12 Mar 2019 17:01:34 +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) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS; Tue, 12 Mar 2019 17:01:34 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 346122BF4B; Tue, 12 Mar 2019 17:01:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1552410094; bh=ehM/wuy7TPirt4Q6GTn0HUPo/rU7ZMJSR6kAJJDwrm4=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To; b=Li05G0mN1Db4UlejZdTL4A33/WSYBQ+Uatx3ywJMHpg4UsYxsmDQuLideNlwm0US3 S6kfBm7PELwc6FPWcpZAbUZMoGeo2rEQeVjZFEJP+6otVp/csISg45GecPOp/kfxuy AAXtFGT1/9mwAap+L9jtpKKPcW1dDO1xIVoPE7bZBxp8KxjhzFfHYFpfdEqV4QFFEj 1RueRNle3UDkNoQJkV0BqNmUyF7Md3ZdQVTgFE1gAo/wyid7ivl47haGGD3uWpjLzh oZRYLwSbQf6JXKOD1gXS1pZxGJyhxUG85ftUFOgunntjwSSv4rv5Sm/iWJKMniWvx1 WUhMJawax1esRaZ8VZ9AjKiYl+AZWFgETC2fuyLEuh8Qju0/o+W33GaP4ArCLwjtac OdyXQN9/x72YlPjyA+sxVGDmwX05WG7+vZWYbn8sqGp1uBZHj1WtVQcxugBudTIuSj klcOJlmYiM5rRWl9qesXIOsBRawD9e8uniGyNzxtN85y9J+n32njKKNdrKrVI1WjLM ezUqoPhG5CJBc7b0/9y4p5RisZSHWNm3JhINAdLYFt2NPZdMFSItYEAbZ6BtWXtFeT M1BrqCSsDO+GlhtQ9Xbc5Ogo/tL+dAkPPjNi47LxkejA6to3GPOmC0qOcySLkX2neX GjAxSv2BKgF5C/n4L6cLJKHs= Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id E7CEA2BF4B for ; Tue, 12 Mar 2019 17:01:30 +0000 (UTC) Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by luna.archlinux.org (Postfix) with ESMTPS for ; Tue, 12 Mar 2019 17:01:30 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 9F57111331ABF6; Tue, 12 Mar 2019 17:01:25 +0000 (UTC) Received: from didactylos.localdomain (unknown [216.97.144.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: eschwartz) by orion.archlinux.org (Postfix) with ESMTPSA id 310A111331ABF5; Tue, 12 Mar 2019 17:01:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1552410085; bh=ehM/wuy7TPirt4Q6GTn0HUPo/rU7ZMJSR6kAJJDwrm4=; h=From:To:Subject:Date:In-Reply-To:References; b=jXbwOBXBi4nGpDEAr2BjOHLgn6q4Mt0cKiG/yTteMJ8uc6loMCfKeYhHOwKTt0Ckm JhTKAzZxcEC3SO7qkqbQU5OthgZ887gtbF5MWA7zmnjrDIW4CUoy7azArWK1TyhVP9 BCbmrj8wf+c+cqMU1Kszp/vBNYP7HHIhowLjft4zM4PakAoxUpn7quLrpkmgz22IbC UzJbSUik7EgwqjZLan9FfAB2nGhtmLJQzKoty0Yr4exuj6jXQMzixtYmGSJ9xI+5iD 6cvfj6YTIxwNkMHZZ7SMoP6ykZBZpgyynWRVxJX8FklCQl3RML+54clI8ESqap86ZL 07k3nTO/wSN89RcITQrjW5ykXFGQkZxD2ISlPtJ4Ay4RNmYcDeltuoIBtXi9ui24sz 11OrmSPzUvX/G+H24j3tUPvpPoj2cX/4cPkWi8WqUs62ZZBAaRcSTI1uaOcH6zo2MX RbDAGn1eC3QFrpmrpLTUEegelVZP7Pwn35tMQee43bHt/CSrcj7f1//liMH5xkf4Jd L9NTSzI9j/wzhRUn4qe/TcEx0R9Up6qJHytQvL6vy6+8pLs6KashmkniZGBii+d9kX EIyZLkVoK41nvE77YBIlDcPxMEvzGGoB5wwq+TL+BW6s3YS+MVysnxRX15FHm+jwWp 0mt8MbqarLkVdnYaLsPSNojI= From: Eli Schwartz To: pacman-dev@archlinux.org Date: Tue, 12 Mar 2019 13:01:13 -0400 Message-Id: <20190312170114.9291-2-eschwartz@archlinux.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190312170114.9291-1-eschwartz@archlinux.org> References: <20190312170114.9291-1-eschwartz@archlinux.org> MIME-Version: 1.0 Subject: [pacman-dev] [PATCH 2/3] doc: generalize description of the bash nature of PKGBUILD functions X-BeenThere: pacman-dev@archlinux.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for pacman development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Discussion list for pacman development Errors-To: pacman-dev-bounces@archlinux.org Sender: "pacman-dev" Currently this is scoped to the build() function, which is simply wrong as it equally applies to any function. Simply moving the paragraphs up to the main manpage section makes this clear. Signed-off-by: Eli Schwartz --- doc/PKGBUILD.5.asciidoc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/PKGBUILD.5.asciidoc b/doc/PKGBUILD.5.asciidoc index 285627ab..83a61458 100644 --- a/doc/PKGBUILD.5.asciidoc +++ b/doc/PKGBUILD.5.asciidoc @@ -332,6 +332,14 @@ PKGBUILD must contain a `package()` function which installs all the package's files into the packaging directory, with optional `prepare()`, `build()`, and `check()` functions being used to create those files from source. +This is directly sourced and executed by makepkg, so anything that Bash or the +system has available is available for use here. Be sure any exotic commands +used are covered by the `makedepends` array. + +If you create any variables of your own in any of these functions, it is +recommended to use the Bash `local` keyword to scope the variable to inside the +function. + *package() Function*:: The `package()` function is used to install files into the directory that will become the root directory of the built package and is run after all @@ -351,14 +359,7 @@ files into the packaging directory, with optional `prepare()`, `build()`, and *build() Function*:: The optional `build()` function is use to compile and/or adjust the source - files in preparation to be installed by the `package()` function. This is - directly sourced and executed by makepkg, so anything that Bash or the - system has available is available for use here. Be sure any exotic - commands used are covered by the `makedepends` array. -+ -If you create any variables of your own in the `build()` function, it is -recommended to use the Bash `local` keyword to scope the variable to inside -the `build()` function. + files in preparation to be installed by the `package()` function. *check() Function*:: An optional `check()` function can be specified in which a package's