use source info from final_distro for logging

Failures in upgrades should be logged against the version we are upgrading to,
not the version we are upgrading from.

Signed-off-by: Ivo De Decker <ivo.dedecker@ugent.be>
add changelog entry for Ivo
Rearrange old unittests.py; Use nosetests

* Move unittests.py to tests/ subdirectory
* Split out dependencyparser test to an extra file
* Add configuration for nosetests
* Use nosetests in Makefile target "check"
add changelog entry for Matthias
Enable unittests during package build

* Added needed Build-Depends
* Re-enable unittests in debian/rules
* Don't create coverage files during package build
Cleanup TODO and make changelog more verbose.
scripts-leftovers: preseed pluxml cleanup during purge

Signed-off-by: Andreas Beckmann <anbe@debian.org>
lib/db: _compute_package_state(): compute dep_states once

Signed-off-by: Andreas Beckmann <anbe@debian.org>
lib/db: get_best_package_state(): consider providers as well

the real package may be uninstallable (e.g. mplayer), but another package
providing that as a virtual package (e.g. mplayer2 in this case) can be
used to fulfill a dependency

Signed-off-by: Andreas Beckmann <anbe@debian.org>
lib/db: test essential-required packages like regular ones

do not classify them as essential-required initially
the install and upgrade tests will be no-ops with an adequate run afterwards
needed as an early indicator that some essential package is rc-buggy

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-r: mark essential-required as obsolete

removing the always-empty category from the report

Signed-off-by: Andreas Beckmann <anbe@debian.org>
update essential-required list for experimental

Signed-off-by: Andreas Beckmann <anbe@debian.org>
piuparts.py: Check the installation status of the packages after installing them. Thanks to Julien Cristau for the patch! (Closes: #718544)
lib/db: load_alternate_versions_from_packages_urls(): new method

to replace the Version of all packages loaded from an older distro
with the current version (or "None") in the final distro

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p-m,p-r: use load_alternate_versions_from_packages_urls()

Signed-off-by: Andreas Beckmann <anbe@debian.org>
p: ignore backup files from base-passwd

these backups are created by base-passwd and modified on upgrades that
change the shell for most system accounts to /usr/sbin/nologin (#274229)

Signed-off-by: Andreas Beckmann <anbe@debian.org>
piuparts.py: Report adequate version used.
piuparts.py: Move unittests to the tests/ directory

* Move the code for the is_broken_symlink unittest out of piuparts.py into a
  own file in the tests/ directory. Now nosetests can run this test and detect
  the coverage.
piuparts.py: Add unittest for DefaultsFactory / Defaults

* Use pymox to mock the piuparts.guess_flavor() function as it would run
  lsb_release in a subprocess.
* Add python-mox3 to Build-Depends as it is now needed for runnig unittests in
  the package build.
unittests: Add tests/README

* Add a little documentation on naming the test classes and functions.