You are not logged in.

#1 2009-10-10 07:40:23

StanIsTheMan
Member
Registered: 2009-09-18
Posts: 38

The "arch=()" var in PKGBUILD's syntax question

I have noticed in different PKGBUILD's that the variable "arch=()" contains either:

arch=('i686' 'x86_64')

or

arch=(i686 x86_64)

Are the '' necessary...?  Would this work for one of my PKGBUILD's

arch=(x86_64)

Simple syntax question.... its that I have seen it done differently.

Offline

#2 2009-10-10 07:44:01

Andrwe
Member
From: Leipzig/Germany
Registered: 2009-06-17
Posts: 322
Website

Re: The "arch=()" var in PKGBUILD's syntax question

All versions you've given work in a PKGBUILD.
In my opinion the usage of '' is cleaner than without.

Offline

#3 2009-10-10 07:50:53

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,425
Website

Re: The "arch=()" var in PKGBUILD's syntax question

See the example at the end of "man PKGBUILD" for a guide to the best practise.

Offline

#4 2009-10-10 07:55:18

StanIsTheMan
Member
Registered: 2009-09-18
Posts: 38

Re: The "arch=()" var in PKGBUILD's syntax question

Allan wrote:

See the example at the end of "man PKGBUILD" for a guide to the best practise.

Ya .. I had read the man .... I just had seen some PKGBUILD's from the AUR that where missing the syntax... And I was just wondering if it at all, had an effect the build.

Offline

#5 2009-10-10 13:15:29

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: The "arch=()" var in PKGBUILD's syntax question

the $arch array should contain the architecture in which the package can build and run on. I iritates me when I find packages in aur that only lists i686 when it builds and runs just fine on x86_64 too. (or the other way around)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2009-10-10 13:29:39

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: The "arch=()" var in PKGBUILD's syntax question

Mr.Elendig wrote:

the $arch array should contain the architecture in which the package can build and run on. It irritates me when I find packages in aur that only lists i686 when it builds and runs just fine on x86_64 too. (or the other way around)

What if the maintainer only has a i686 box and just build/test packages on i686 ?

But maybe, when in doubt, it would still be better to include both by default, and if he gets a report that the package does not build on one arch, he can try to investigate what the problem is, and remove the arch if it cannot be fixed.

Anyway if this makes sense and if this is what you meant, maybe it should be better explained and documented, e.g. in AUR guidelines.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

Board footer

Powered by FluxBB