Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.

FS#16352 - architecture specific dependencies

Attached to Project: Pacman
Opened by Andrwe (Andrwe) - Friday, 25 September 2009, 10:05 GMT
Last edited by Allan McRae (Allan) - Wednesday, 12 January 2011, 08:19 GMT
Task Type Feature Request
Category makepkg
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 3.3.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



it would be nice if there would be a way to specify dependencies architecture specific and these will be shown on the AUR-webinterface.

At the moment there is only this possiblity AFAIK:

[ "$CARCH" == "x86_64" ] && depends=('other_depends')

But this possibility don't show the dependencies of x86_64 on the webinterface.

One way I've in mind would be something like this:

depends=('foo' ?i686 'bar' ?x86_64 'lib32-bar' 'foobar')

In this case the architecture is checked against the value after ? and only if it matches it will set the following package as dependency.

One bug of the mentioned method would be there is no default package which would be installed if the arch doesn't match any of the given.

I hope you can understand what I'm trying to say.
This task depends upon

Closed by  Allan McRae (Allan)
Wednesday, 12 January 2011, 08:19 GMT
Reason for closing:  Won't fix
Comment by Loui Chang (louipc) - Monday, 09 November 2009, 18:05 GMT
This seems to be a touchy thing to support.
As far as I know, implementation of architecture dependencies are usually shell scripting hacks on the PKGBUILD.
I'd like to see official support for such usage in makepkg and the PKGBUILD spec.

Comment by Loui Chang (louipc) - Monday, 09 November 2009, 18:46 GMT
I'll move this to the pacman tracker.
Comment by Loui Chang (louipc) - Monday, 09 November 2009, 18:48 GMT
This is originally filed in the AUR tracker, but it suggests a changing of the PKGBUILD spec, so I've moved it to pacman.

In addition to architecture specific dependencies, it would be advantageous to have a formal way to specify architecture specific sources.
Comment by xduugu (xduugu) - Wednesday, 18 November 2009, 23:26 GMT
>One way I've in mind would be something like this:
>depends=('foo' ?i686 'bar' ?x86_64 'lib32-bar' 'foobar')

In my opinion, this syntax makes only sense if there are no more than two architectures and I find it quite hard to read. I would prefer a simpler syntax, e.g. by introducing new variables:

depends=(...) # dependencies for all architectures
depends_$CARCH=(...) # dependencies for $CARCH
depends_not_$CARCH=(...) # dependencies for all archs except for $CARCH (could be useful for (bin|lib)32 packages)

This syntax should be easily extended to all other variables.

Nevertheless, this request seems to be a neat idea. My only concern is that it will not become accepted.
Comment by Gavin Bisesi (Daenyth) - Friday, 18 December 2009, 14:26 GMT
Is this really needed? I think case $CARCH in; i686) depends=();; x86_64) depends=();; *) foo;; esac handles this cleanly.
Comment by Allan McRae (Allan) - Wednesday, 12 January 2011, 08:19 GMT
I'll make people a deal... when everybody agrees on the optimal syntax for this, I will implement it. Until that point, bash conditionals and case statements do the job. They are not "hacks" given a PKGBUILD is just a bash script after all.