grip-overridearch.pl(1) sanitise Arch: all packages that depend on Arch: any

Synopsis

 grip-overridearch.pl -s|--suite STRING -b|--base-path PATH [--grip-name STRING]
 grip-overridearch.pl -?|-h|--help|--version
 Commands:
 -s|--suite STRING:        Name of the distribution to override [required]
 -b|--base-path PATH:      path to the top level repository directory [required]
 -?|-h|--help|--version:   print this help message and exit
 Options:
   --grip-name STRING:     alternative name for the grip repository

The script expects to find a suitably formatted architecture-override file in the repository configuration:

 $base_path/$grip_name/conf/override.architectures

Description

The list of packages and ``broken'' architectures needs to be identified the hard way until such time as a resolution is found for the problem outlined on debian-devel: http://lists.debian.org/debian-devel/2009/01/msg00289.html <http://lists.debian.org/debian-devel/2009/01/msg00289.html>

This script will use a file in the repository conf/ directory which looks like an override file but is not handled by reprepro itself. Quoting dato: http://lists.debian.org/debian-devel/2009/01/msg00312.html <http://lists.debian.org/debian-devel/2009/01/msg00312.html>

 ... the only use for "Architecture: all [i386 amd64]" or
 "Install-Architecture: i368 amd64" would be as a hint to dak (and other
 tools) that the package is known not to be installable anywhere else,
 and hence should not be put in other Packages.gz files. That's *all*
 that matters AIUI.

Until the tools can be adapted to use such syntax, this script removes the specified listings from the relevant Packages files by calling the relevant remove option for the tools, after the event.

So if $package_name represents the name of the binary package that is Architecture: all but which depends on a package that only exists on selected architectures, the format for the override file is:

 Package: $package_name
 Architecture: all [i386 amd64]

e.g.

 Package: debian-edu-profile-udeb
 Architecture: all [i386 amd64]

This happens because debian-edu-profile-udeb depends on dmidecode-udeb http://packages.debian.org/sid/dmidecode-udeb <http://packages.debian.org/sid/dmidecode-udeb> which in turn is only available on x86 architectures:

 $ reprepro -b /opt/reprepro/filter/ list unstable dmidecode-udeb
 u|sid|main|i386: dmidecode-udeb 2.9-1
 u|sid|main|amd64: dmidecode-udeb 2.9-1

When edos-debcheck parses the Packages file, it finds that reprepro and other repository tools list debian-edu-profile-udeb in the Packages files for all supported architectures (like arm, armel, mips etc.) so it tries to satisfy the dependencies - and fails because dmidecode is not available. The solution is to remove the listing for the Architecture: all package from all Packages files that do not contain the necessary dependencies - identified by running edos-debcheck against the Packages files and adding packages to the override.arch file until edos-debcheck stops complaining.

This is not peculiar to this package or even just udebs, it is also a problem with packages like acpi-support-base.

Removing all binaries

It is also possible to remove all binaries for a specific package (leaving only the source and other binaries built from that source package) by specifying an empty list of allowed architectures:

 Package: lsb
 Architectures: all [ ]

Note that the space is optional. This can be useful when the binary package with the same name as the source package has a lot of unwanted dependencies ("lsb" is a perfect example of this problem).

Copyright and Licence

 Copyright (C) 2007-2009  Neil Williams <[email protected]>
 This package is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.