[pacman-dev,3/3] doc: elaborate on what a build() function is meant for

Message ID 20190312170114.9291-3-eschwartz@archlinux.org
State New
Headers show
Series
  • [pacman-dev,1/3] doc: describe when and why the prepare function should be used
Related show

Commit Message

Eli Schwartz March 12, 2019, 5:01 p.m. UTC
It is often not obvious to people, that build() can be run multiple
times when continuing a build with --noextract.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
---
 doc/PKGBUILD.5.asciidoc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Allan McRae March 19, 2019, 4:14 a.m. UTC | #1
On 13/3/19 3:01 am, Eli Schwartz wrote:
> It is often not obvious to people, that build() can be run multiple
> times when continuing a build with --noextract.
> 
> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
> ---
>  doc/PKGBUILD.5.asciidoc | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/PKGBUILD.5.asciidoc b/doc/PKGBUILD.5.asciidoc
> index 83a61458..6336a5cd 100644
> --- a/doc/PKGBUILD.5.asciidoc
> +++ b/doc/PKGBUILD.5.asciidoc
> @@ -359,7 +359,11 @@ function.
>  
>  *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.
> +	files in preparation to be installed by the `package()` function. All
> +	commands specific to the package creation (but not source code
> +	preparation), before the final installation of files into the packaging
> +	root, should be performed here. The `build()` function is permitted to run
> +	multiple times if `makepkg --noextract` is used.

The last sentence is confusing.  I know when the build() function runs,
but still took too long to parse what you meant.


>  *check() Function*::
>  	An optional `check()` function can be specified in which a package's
>
Eli Schwartz March 19, 2019, 4:34 a.m. UTC | #2
On 3/19/19 12:14 AM, Allan McRae wrote:
> On 13/3/19 3:01 am, Eli Schwartz wrote:
>> It is often not obvious to people, that build() can be run multiple
>> times when continuing a build with --noextract.
>>
>> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
>> ---
>>  doc/PKGBUILD.5.asciidoc | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/doc/PKGBUILD.5.asciidoc b/doc/PKGBUILD.5.asciidoc
>> index 83a61458..6336a5cd 100644
>> --- a/doc/PKGBUILD.5.asciidoc
>> +++ b/doc/PKGBUILD.5.asciidoc
>> @@ -359,7 +359,11 @@ function.
>>  
>>  *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.
>> +	files in preparation to be installed by the `package()` function. All
>> +	commands specific to the package creation (but not source code
>> +	preparation), before the final installation of files into the packaging
>> +	root, should be performed here. The `build()` function is permitted to run
>> +	multiple times if `makepkg --noextract` is used.
> 
> The last sentence is confusing.  I know when the build() function runs,
> but still took too long to parse what you meant.

Would it help to say:

s/run/be executed/

Patch

diff --git a/doc/PKGBUILD.5.asciidoc b/doc/PKGBUILD.5.asciidoc
index 83a61458..6336a5cd 100644
--- a/doc/PKGBUILD.5.asciidoc
+++ b/doc/PKGBUILD.5.asciidoc
@@ -359,7 +359,11 @@  function.
 
 *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.
+	files in preparation to be installed by the `package()` function. All
+	commands specific to the package creation (but not source code
+	preparation), before the final installation of files into the packaging
+	root, should be performed here. The `build()` function is permitted to run
+	multiple times if `makepkg --noextract` is used.
 
 *check() Function*::
 	An optional `check()` function can be specified in which a package's