You are not logged in.

#1 2012-02-20 16:07:57

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

[makepkg] check architecture before dependencies ?

An aur package i recently adopted has been updated by me but is x86_64 only for now.

A user mentioned that on his 32-bit system makepkg complained about a missing lib32-* dependency.

Does anyone know if it is possible to make sure makepkg checks architecture before other fields like depends ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#2 2012-02-20 16:36:56

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

Re: [makepkg] check architecture before dependencies ?

Look at the Skype PKGBUILD to see how it's done.

Offline

#3 2012-02-20 17:28:56

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [makepkg] check architecture before dependencies ?

Thanks, the skype PKGBUILD gave me an idea how to do it, althought i did encounter a problem :
$CARCH is x86_64 when building with 'linux32 makepkg' on a x86_64 system, so i used a slightly different check :

_MachineType=`uname -m`
if [[ ${_MachineType} == i686 ]]; then
  echo "Package is x86_64 only for now, aborting makepkg"
  return 1
else
  depends=('libglade' 'lib32-glibc')
fi

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2012-02-21 09:57:04

josephg
Member
From: Brazil
Registered: 2009-09-28
Posts: 106

Re: [makepkg] check architecture before dependencies ?

This doesn't make much sense. Why do you want to allow the user to enter in the build process to simply print a message and throw away? Having set "arch=(x86_64)" already does the job of disallowing 32-bit users to build and/or install this package - that's a default feature of makepkg and pacman.

Offline

#5 2012-02-21 10:32:39

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

Re: [makepkg] check architecture before dependencies ?

Lone_Wolf wrote:

$CARCH is x86_64 when building with 'linux32 makepkg' on a x86_64 system, so i used a slightly different check :

I have no idea what you are trying to do there, but I know that it is wrong....

Offline

#6 2012-02-21 23:54:43

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [makepkg] check architecture before dependencies ?

josephg wrote:

This doesn't make much sense. Why do you want to allow the user to enter in the build process to simply print a message and throw away? Having set "arch=(x86_64)" already does the job of disallowing 32-bit users to build and/or install this package - that's a default feature of makepkg and pacman.

Josephg, a arch 32-bit user posted a comment stating he tried to run 'makepkg -s' on my PKGBUILD (had only arch=x86_64 in it then ), and makepkg tried to install lib32-glibc on a 32-bit system .... .
I have no idea when makepkg checks for the architecture, but apparentl;y it checks for missing dependencies BEFORE it checks architecture.

@ Allan :
i was trying to find an easy way to build a 32-bit on x86_64.
I wanted to avoid setting up a chroot or edit/use an alternative makepkg.conf.

linux32 / setarch change the machinetype that a program sees and i had partial success :

linux32 makepkg did result in a package with 32-bit ELF files according to the file-command, but it still got x86_64 in the package name.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB