[Piuparts-devel] configuration redundancies

Andreas Beckmann anbe at debian.org
Sun Feb 24 01:19:41 UTC 2013


to perform an install/purge test, I have to specify

distro = sid
chroot-tgz = ../../basetgz/sid.tar.gz

For an upgrade test I have to specify

upgrade-test-distros = squeeze wheezy
upgrade-test-chroot-tgz = ../../basetgz/squeeze.tar.gz

piuparts-slave makes the decision which tests to run on the
chroot-tgz/upgrade-test-chroot-tgz arguments. While this allows the
following flexibility:

distro = squeeze
chroot-tgz = ../../basetgz/squeeze.tar.gz
upgrade-test-distros = squeeze wheezy
upgrade-test-chroot-tgz = ../../basetgz/squeeze.tar.gz

to run both install/purge and distupograde tests (good luck parsing the
logfile in case of errors ...) I don't really see a use case for this.

So the -tgz settings are redundant with the distro/upgrade-test-distro

Especially after merging distros.conf support it should be trivial to
generate the basetgz name from the (distros, upgrade-test-distros)
settings. It may still be useful to allow chroot-tgz to be used as an
override, but by default we can derive the name automatically.

So I'd opt for eliminating upgrade-test-chroot-tgz and making chroot-tgz
optional, and making the decision whether to run a distupgrade test on
  len(config["upgrade-test-distros"].split()) > 1

Furthermore I plan to introduce a basetgz-directory (default='.') for
easy sharing of the basetgz's between different sections with the same
base distro. For piuparts-slave.deb /var/cache/piuparts/basetgz could be
an option.

The description setting as very boring, too, and can be easily
generated, too. There seem to be two templates being used, one for
install/purge, another for distupgrade.

Here I'd do the following:
* if unset or empty: generate the default, depending on the configured test
* if set and nonempty and starts/ends with a '+', generate the default,
and append/prepend the supplied description
* otherwise use the supplied description

How can we make the "Debian" generic to not hardcode it?


More information about the Piuparts-devel mailing list