You are not logged in.

#1 2007-09-14 07:38:52

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Automatically tagging arch=(x86_64) to PKGBUILDs in yaourt?

Every time I get a package from the AUR, I need to manually edit it to add the arch=('x86_64') string so I can get packages to install.  Is there something magical I could to to put that string in the PKGBUILDs, as well as make me a burger?  I am really hungry.

Offline

#2 2007-09-14 09:01:29

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Automatically tagging arch=(x86_64) to PKGBUILDs in yaourt?

There are three possible values for the arch= field at present:
('i686') - builds on i686 only
('x86_64') - builds on x86_64 only
('i686' 'x86_64') - builds on both

Obviously, these can only be added after a successful build on either, or both, architectures.

AUR maintainers typically have access to only one architecture, so they are relying on users of the other architecture - you, in this case - to attempt the alternate build, and then advise them whether it worked. Only then can they change the arch= field.

HTH.

Offline

#3 2007-09-14 12:16:32

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Automatically tagging arch=(x86_64) to PKGBUILDs in yaourt?

Tom's got a point - if you find a package missing x86_64 as a supported arch, and you can build and run it fine on your system, let the package maintainer know so they can add it into the PKGBUILD.

In any case, this is a bit hacky, but will probably work:

#!/bin/bash
# makepkg64.sh - add the x86_64 arch as supported, then make the package.

[ -f ./PKGBUILD ] && echo "arch=('x86_64')" >> PKGBUILD
makepkg $@

cat << EOF
Here's a juicy hamburger:
          _..----.._
        .'     o    '. 
       /   o       o  \
      |o        o     o|
      /'-.._o     __.-'\
      \      `````     /
      |``--........--'`| 
       \              /
   jgs  `'----------'`

Eat it while you tell the upstream maintainer whether this package works or not.
EOF

Last edited by Cerebral (2007-09-14 12:23:19)

Offline

#4 2007-09-14 13:08:56

lessthanjake
Member
From: Norway
Registered: 2005-11-09
Posts: 319
Website

Re: Automatically tagging arch=(x86_64) to PKGBUILDs in yaourt?

Isn't yaort written in some scripting language. I dont use it, but have written my own tool in python. To fix this problem (for i686) I just added this line at the appropriate place:

os.system('grep arch PKGBUILD |grep i686 || sed -i s/build\(\)/arch=\(i686\)\\\\nbuild\(\)/g PKGBUILD')

You could probably just do something similar.

Offline

Board footer

Powered by FluxBB