[pacman-dev] [PATCHv2 2/2] handle arch specific attributes

Allan McRae allan at archlinux.org
Sun Aug 3 04:50:19 EDT 2014


On 03/08/14 01:54, Dave Reisner wrote:
> This introduces support for architecutre-specific conflicts, depends,
> optdepends, makedepends, replaces, and conflicts by appending "_$CARCH"
> to the array name. For example, in the global section:
> 
>   arch=('i686' 'x86_64')
>   depends=('foo')
>   depends_x86_64=('bar')
> 
> This will generate depends of 'foo' and 'bar' on x86_64, but only 'foo'
> on i686. Moreover, this is supported in the package functions with the
> same heuristics as the generic names, e.g.
> 
>   ...
>   arch=('i686' 'x86_64')
>   depends=('foo')
>   ...
> 
>   package_somepkg() {
>     depends_x86_64=('bar')
> 
>     ...
>   }
> 
> Again, will cause x86_64 to have depends of 'foo' and 'bar', but only
> 'foo' for i686.
> ---
> v2:
> 1) extended this to a bunch more attributes -- some of them I can't
> necessarily reason an immediate use case for, but conceptually could
> have their uses as arch-specific attributes.
> 2) Added documentation
> 3) Added check_sanity support post mega-refactoring.
> 
>  doc/PKGBUILD.5.txt    | 21 +++++++++++++++++++++
>  scripts/makepkg.sh.in | 46 +++++++++++++++++++++++++++++++++++++++++++---
>  2 files changed, 64 insertions(+), 3 deletions(-)
> 
> diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
> index 17e8af2..5cebbbd 100644
> --- a/doc/PKGBUILD.5.txt
> +++ b/doc/PKGBUILD.5.txt
> @@ -183,17 +183,26 @@ If the dependency name appears to be a library (ends with .so), makepkg will
>  try to find a binary that depends on the library in the built package and
>  append the version needed by the binary. Appending the version yourself
>  disables automatic detection.
> ++
> +Architecture-specific depends can be added by appending an underscore and the
> +architecture name e.g., 'depends_x86_64=()'.
>  

Do we want to repeat this sentence many times or add a single section
detailing architecture specific additions.

Also, despite "added" there, I do not find it clear that these are
overrides.  Perhaps "Additional architecture-specific..." would help.
If this was in its own section, it could be expanded for clarity.


More information about the pacman-dev mailing list