carta
emtargetcmp(1)

emtargetcmp1

Compare the emdebian target repository with debian unstable

Overview

emtargetcmp prepares cache data from the emdebian/emdebian target cache at buildd.emdebian.org against the Debian unstable cache at ftp.uk.debian.org for arm with support for mapping Emdebian version strings to Debian versions.

Uses ftk.uk.debian.org or ftp.de.debian.org due to location of buildd.emdebian.org

One of the remaining issues with this approach is the apparent lack of support for creating a sources.list in memory without needing lots of little files. Therefore emtargetcmp creates a special sources list in the apt-cross directory (e.g. ~/.apt-cross/) and switches the content of the file as necessary.

This small utility also serves as an example of what can be done with Cache::Apt::* from libcache-apt-perl.

Currently, emtargetcmp only supports ARM because Emdebian only has a root filesystem for ARM.

Output uses ANSIColor (where supported) so that packages which are older in Emdebian than in Debian are listed in red and packages which are the same version in Emdebian as in Debian (accounting for the emdebian version suffix) are shown in green. If, for whatever reason, Emdebian contains packages that are newer than in Debian, these are shown in blue.

Options

 -a|--arch
Override the dpkg-cross default architecture.
 -v|--verbose
Make the output more verbose.
 -q|--quiet
Make the output quieter.

Bugs

A long standing bug in apt is that when switching architecture or when switching between repository sources, apt has a habit of purging the lists directory of whatever cache is being used. Despite apt-cross using -o APT::Get::List-Cleanup=off in all calls, this behaviour has returned in recent versions of apt.

To get around this, emtargetcmp now creates a temporary directory, copies the system cache, queries that and then removes the copy. This allows apt to use lock files and status files in the temporary directory without requiring sudo. (The temporary directory used is $apt_cache_dir/host/.)

From emdebian-tools 1.4.3 in Debian 5.0 (Lenny). Parsed by carta from the page's man source.