[Dev] [issue216] [libretools] generate arch array in PKGBUILDs from separate files

Michał Masłowski (Parabola Issue Tracker) bugs at parabolagnulinux.org
Tue Oct 18 09:55:15 GMT 2011

New submission from Michał Masłowski:

Currently updating abslibre-mips64el requires manually merging PKGBUILDs with
changed arch array to include mips64el.  I believe that storing this data in
separate files can make this need less manual work and provide more information
useful for packagers.

For a package "foo" known to work on i686 and x86_64, known to not work on
mips64el, unknown to work on sparc64 (just another architecture for the example)
the following files should exist:
- foo/arch-i686
- foo/arch-x86_64
- foo/noarch-mips64el

The content of arch-* and noarch-* files would be completely ignored by the
tools, maybe with links to bug reports or information that the package is
completely useless without specific hardware/software not available on that
architecture in case of noarch-* for use by developers.

libremakepkg could modify the PKGBUILD to include the line "arch=(i686 x86_64)"
in the copy used by makepkg.

The following algorithm could be used to change existing arch arrays:
1. add elements for arch-*
2. remove elements for noarch-*

This would keep existing PKGBUILDs working and require only adding one line to
mark it as working on mips64el.

Separate noarch-* would make the distinction between packages not tried on
mips64el and packages known to not work there (valgrind, most native code
generators, etc) clear, making it easier for contributors to know if a package
needs building on mips64el.  Removing the package directory from
abslibre-mips64el currently can do the same, but it would be more complex if we
supported more architectures.

Since we build all packages for upload with libremakepkg (or fullpkg which uses
libremakepkg) and it works well also for non-uploaded packages, I don't expect
making PKGBUILDs not directly useful on mips64el without this tool to be a problem.

I proposed this change initially on the IRC channel when discussing using a
separate git repo for each package, or some way of branching to limit time spent
on merging Arch changes.  It's possible that this issue can be done mostly
separately and partially solve this problem without changing the repo organization.

keyword: libretools, mips64el
messages: 833
nosy: dev_list, mtjm
priority: feature
status: unread
title: [libretools] generate arch array in PKGBUILDs from separate files

Parabola's issue tracker <bugs at parabolagnulinux.org>

More information about the Dev mailing list