[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#376590: developers-reference: suggests to test downgrading

Package: developers-reference
Version: 3.3.7
Severity: normal

|* Downgrade the package to the previous version (if one exists) ---
|this tests the `postrm' and `prerm' scripts.

Although downgrading *might* be actively supported by some packages,
this seems to imply that it must be supported, which encourages people
to think that they're allowed to downgrade stuff.
Also, it seems misleading in its suggestion about the
{post,pre}removal maintscripts, which are also exercised during any
upgrade (though different paths are not, and it takes pretty
deliberate effort to test eg. the abort-* and failed-* paths).

A better recipe for testing (copied from a message to my AM):

  . put package into "old version installed" state, perhaps by purging
    whatever's installed, and apt-get installing some version from the
    archive (probably shouldn't be older than the most recent stable

  . dpkg -i foo.deb

  . check that the upgrade happend as intended; this might include
    things like: conffile updates, /usr/doc transition stuff,
    symlink/dir conversion stuff, etc.  Basically ensuring that the
    maintscripts do what's intended.  The package should of course be
    usable :)

  . dpkg -r foo

  . again make sure the maintscripts do what's intended.  Make sure
    that eg. info documents and alternatives are unregistered.

  . dpkg -P foo

  . make sure that any generated files (eg. in /var/{lib,cache} and
    /etc/) are removed.  This also includes debconf cache and anything
    similar eg. update-rc.d removal.

  . dpkg -i foo.deb

  . Check more maintscript actions; the package should be usuable

  . dpkg -i foo.deb

  . The package should still be usable :)  This should probably just
    check for idempotency at some level; eg. that installation doesn't
    depend on some file that is only created in preinst.

Reply to: