[pacman-dev,1/2] Add 'arch' field to .BUILDINFO

Message ID 20180317212401.27429-2-robin@broda.me
State Changes Requested, archived
Headers show
Series Add Architecture information to .BUILDINFO | expand

Commit Message

Robin Broda March 17, 2018, 9:24 p.m. UTC
Signed-off-by: Robin Broda <robin@broda.me>
---
 doc/BUILDINFO.5.txt   | 3 +++
 scripts/makepkg.sh.in | 1 +
 2 files changed, 4 insertions(+)

Comments

Eli Schwartz March 18, 2018, 1:22 a.m. UTC | #1
On 03/17/2018 05:24 PM, Robin Broda wrote:
> Signed-off-by: Robin Broda <robin@broda.me>
> ---
>  doc/BUILDINFO.5.txt   | 3 +++
>  scripts/makepkg.sh.in | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/doc/BUILDINFO.5.txt b/doc/BUILDINFO.5.txt
> index b7a72831..4734301e 100644
> --- a/doc/BUILDINFO.5.txt
> +++ b/doc/BUILDINFO.5.txt
> @@ -44,6 +44,9 @@ BUILDINFO file format.
>  *packager*::
>  	The details of the packager that built the package.
>  
> +*arch*::
> +	The architecture of the package.
> +

I question the utility of duplicating this information in both
.BUILDINFO and .PKGINFO
Allan McRae March 18, 2018, 1:36 a.m. UTC | #2
On 18/03/18 11:22, Eli Schwartz wrote:
> On 03/17/2018 05:24 PM, Robin Broda wrote:
>> Signed-off-by: Robin Broda <robin@broda.me>
>> ---
>>  doc/BUILDINFO.5.txt   | 3 +++
>>  scripts/makepkg.sh.in | 1 +
>>  2 files changed, 4 insertions(+)
>>
>> diff --git a/doc/BUILDINFO.5.txt b/doc/BUILDINFO.5.txt
>> index b7a72831..4734301e 100644
>> --- a/doc/BUILDINFO.5.txt
>> +++ b/doc/BUILDINFO.5.txt
>> @@ -44,6 +44,9 @@ BUILDINFO file format.
>>  *packager*::
>>  	The details of the packager that built the package.
>>  
>> +*arch*::
>> +	The architecture of the package.
>> +
> 
> I question the utility of duplicating this information in both
> .BUILDINFO and .PKGINFO

There is already a bunch duplicated across those files.  The goal was to
have everything needed to build the package in a reproducible way in the
.BUILDINFO file.

I do question why it was output at that point, rather than under the
version info where it seems much more natural.

A

Patch

diff --git a/doc/BUILDINFO.5.txt b/doc/BUILDINFO.5.txt
index b7a72831..4734301e 100644
--- a/doc/BUILDINFO.5.txt
+++ b/doc/BUILDINFO.5.txt
@@ -44,6 +44,9 @@  BUILDINFO file format.
 *packager*::
 	The details of the packager that built the package.
 
+*arch*::
+	The architecture of the package.
+
 *builddate*::
 	The build date of the package in epoch.
 
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 63b6c3e1..ece53dca 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -688,6 +688,7 @@  write_buildinfo() {
 	write_kv_pair "pkgbuild_sha256sum" $sum
 
 	write_kv_pair "packager" "${PACKAGER}"
+	write_kv_pair "arch" "$pkgarch"
 	write_kv_pair "builddate" "${SOURCE_DATE_EPOCH}"
 	write_kv_pair "builddir"  "${BUILDDIR}"
 	write_kv_pair "buildenv" "${BUILDENV[@]}"