522 Commits

Author SHA1 Message Date
Niels Thykier
30d686164c do_all(): Only sort_actions after recurse runs
sort_actions() can be quite expensive and it is wasteful to resort
actions after each successful "easy"-hint.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-06 20:57:38 +02:00
Niels Thykier
513fea07b8 britney.py: Skip lundo maintenance in non-hint recurse runs
There are no uses of "lundo" left for a non-hint recurse run (i.e.
the "main run"), so there is no point in building it.

The "lundo"-list is still used in the recurse run of a "hint"-hint.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-06 20:57:38 +02:00
Niels Thykier
8ea2157d79 Avoid unnecessary nuninst regressions for break archs
The "do_all"-method now checks the architectures of all changes
applied.  If they entirely consist of items from "break archs", then
"do_all" will disregard the current "break archs" setting when
comparing nuninst counters.

This change avoids unintended installability regressions on break
arches when a hint (manual or automatic) apply only to packages on
break arches.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-06 20:57:31 +02:00
Niels Thykier
b53e8fa501 Move the nuninst checker function to britney_util
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-05 07:56:29 +02:00
Niels Thykier
f02c1fcb82 britney.py: Avoid making migration items from migration items
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-05 07:56:29 +02:00
Niels Thykier
9d45143127 britney.py: Save a table look up
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-05 07:56:29 +02:00
Niels Thykier
9487da51a1 britney.py: Correct the hash key in nuninst_arch_report
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-05 07:54:53 +02:00
Niels Thykier
d41f7f2119 britney.py: Use defaultdict instead of "{}.setdefault"
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:33 +02:00
Niels Thykier
ddf52bc7ca Exploit equivalency to skip unneeded computation
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:33 +02:00
Niels Thykier
6f24be9954 britney.py: Refactor doop_source
Rename local variables and avoid repeated chained lookups.  In
particular, avoid confusing cases like:

   [...]
         version = binaries[parch][0][binary][VERSION]

   [...]
   binaries[parch][0][binary] = self.binaries[item.suite][parch][0][binary]
   version = binaries[parch][0][binary][VERSION]

Where "version" here will refer to two different versions.  The former
the version from testing of a hijacked binary and the latter the
version from the source suite (despite the look up using the "testing"
table, due to the testing copy being updated).

Notable renamings:
 * binaries => packages_t (a.k.a. self.binaries['testing'])
 * binaries[parch][0] => binaries_t_a
 * binaries[parch][1] => provides_t_a
 * Similar naming used for "item.suite" instead of "testing"

The naming is based on the following logic:
 * self.binaries from "packages" files
   (by this logic, it ought to be "self.packages", but that is
   for later)
 * The "_X_a" is short for "[<suite>][<parch>]" look ups.
 * binaries_X_a and provides_X_a are the specialised parts of
   packages_X_a that deal with (real) binary packages and
   provides (i.e. virtual packages) respectively.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:16 +02:00
Niels Thykier
33049b2b1c doop_source: Remove unncessary table loop up
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:02 +02:00
Niels Thykier
4fd740dd8b doop_source: Remove redundant part of the return value
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:02 +02:00
Niels Thykier
faa3f450e1 britney.py: Split iter_packages into two
Extract a specialised iter_packages_hint from iter_packages that only
deals with applying hints.  This simplifies iter_packages AND avoids
having to re-compute the uninstallability counters after each single
item in the hint.

This means that a hint can now avoid triggering expontential runtime
provided only that the "post-hint" stage does not trigger expontential
runtime.  Previously the hint had to be ordered such that none of the
items in the hint caused such behaviour (if at all possible).

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:02 +02:00
Niels Thykier
6a19e254de britney.py: Handle version-ranged dependencies a bit smarter
Avoid creating two dependency clauses for dependencies emulating a
"version range" a la:

  Depends: pkg-a (>= 2), pkg-a (<< 3~)

Previously this would create two clauses a la:

 - (pkg-a, 2, arch), (pkg-a, 3, arch)
 - (pkg-a, 1, arch), (pkg-a, 2, arch)

However, it is plain to see that only (pkg-a, 2, arch) is a valid
solution and the other options are just noise.  This patch makes
Britney merge these two claues into a single clause containing exactly
(pkg-a, 2, arch).

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:19:49 +02:00
Colin Watson
52ad167312 Fix substitution ordering mistake in out-of-date rendering. 2014-07-25 12:37:16 +01:00
Colin Watson
0a4f948e3a Allow Dates to be absent. 2014-07-24 17:35:47 +01:00
Colin Watson
0a2b1fd4b0 Add a --distribution option; parameterise most mentions of "ubuntu" using it. 2014-07-24 15:28:12 +01:00
Colin Watson
f7b4cbc5cb Drop --ubuntu-series alias option now that britney1 no longer uses it. 2014-07-24 15:20:09 +01:00
Colin Watson
d0d4ea5fa8 Rename --ubuntu-series option to just --series. 2014-07-24 15:18:26 +01:00
Niels Thykier
5e7417f416 britney.py: _compute_groups returns sets of tuples, not str
Fix a call site to use a tuple instead of a str when testing if a
package has been smooth-updated.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-07-13 10:01:14 +02:00
Niels Thykier
ad84f50d1b britney.py: dict does not have a .add (in _compute_groups)
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-07-13 10:01:14 +02:00
Colin Watson
9dbef8c864 Adjust maybe-NBS check again, this time to check for newer versions of other binaries from the same source. 2014-07-10 09:22:40 +01:00
Colin Watson
f81e685f99 Fix out-of-date maximum version check to only check binaries, not sources. 2014-07-08 17:34:35 +01:00
Colin Watson
02e9779d35 Only flag an out-of-date package as possible NBS if the out-of-date version is also the maximum version across all architectures. 2014-07-08 15:12:22 +01:00
Colin Watson
18edacf8b2 Show a note for out-of-date binaries from a version between the one in testing and the one in unstable, since those are usually NBS and this makes such cases more searchable. 2014-07-08 14:32:22 +01:00
Niels Thykier
9b24a1d4e7 britney.py: Fix use of undefined variable
A currently dead branch in _compute_group uses an undefined local
variable.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-06-15 21:57:24 +02:00
Adam D. Barratt
28389f730e Remove an obsolete comment
The C library is no longer used so stop suggesting changing it when
there are issues.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2014-06-15 17:18:25 +00:00
Niels Thykier
8d4753530c Britney: Fix malformed removal hints from auto hinter
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-06-15 18:20:22 +02:00
Niels Thykier
271fb11b33 britney.py: Fix bug with hinting removals
Fix a bug in the auto hinter that could make think that sources had
already been removed.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-06-15 16:56:17 +02:00
Niels Thykier
c0409c1b04 Add auto hinter on top of the new installability tester
The "new" auto hinter relies on partial ordering to determine, when
what can migrate (and what needs to migrate at the same time).  At the
same time, it leverages on "_compute_groups" to allow it to include
"removals" in its hints.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-06-08 17:51:50 +02:00
Niels Thykier
ebc9af70fa Handle smooth updates better in "easy"-hints
Avoid smooth-updating libraries in hints, when all of their reverse
dependencies will certainly disappear in the same hint.

Note that in "hint"-hint, reverse dependencies removed in the
following "full run" will not cause the smooth-updated library to be
removed.  Instead these will still be removed in the end as usual, but
in some cases that is too late.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-06-08 17:44:44 +02:00
Niels Thykier
580f4a7f3d Rewrite, rename and extend find_upgraded_binaries
Rename find_upgraded_binaries into _compute_groups.  The new method
will also compute what binaries will be updated in or added to testing
after migration.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-06-08 17:05:23 +02:00
Colin Watson
3aab217f6c Make sure that containing directories exist before writing output files. 2014-06-06 14:45:55 +01:00
Colin Watson
e38a4842d6 Make all output files series-specific, and remove dependency on "testing" and "unstable" symlinks. 2014-06-06 13:22:26 +01:00
Colin Watson
6ac23e6d67 Add new --ubuntu-series option, replacing ADT_SERIES in the configuration file. Add ADT_ENABLE configuration file entry to allow disabling autopkgtests (previously done by setting ADT_SERIES to the empty string). 2014-06-05 11:42:14 +01:00
Jean-Baptiste Lallement
2a3a8cb657 autopkgtest.py: Document method read() and code simplification
britney.py: code simplification
2014-05-12 11:47:40 +02:00
Jean-Baptiste Lallement
7e80d47eb6 autopkgtest.py:
- A test for a package/version can be triggered by several distincts causes with different results. Modify the data structure to store this instead of only storing the last cause and result, leading to missing test results in excuses.
- Check if failures are regressions (there is at least one pass and migration is blocked) or if test has always been failing. In the latter case, migration is not blocked.
- Add colours to excuses.html to distinguishes the test results
- Point jenkins URL to lastBuild
2014-04-29 23:38:45 +02:00
Niels Thykier
d644d7554a Move "old_libraries" to britney_util
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-03-10 18:48:04 +01:00
Niels Thykier
3f86ef3299 Move write_controlfiles to britney_util
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-03-10 18:48:04 +01:00
Niels Thykier
329f1901b4 Factor write_sources into its own function
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-03-10 18:48:04 +01:00
Colin Watson
9b75fcf037 Fix unsatisfied-deps handling of packages without dependencies. 2014-03-05 16:14:48 +00:00
Colin Watson
5974b25d99 Fix inverted logic in should_upgrade_srcarch. 2014-03-05 15:12:45 +00:00
Colin Watson
62bf1130f7 Take a different approach to excluding packages with unsatisfiable dependencies (see https://code.launchpad.net/~pitti/britney/britney2-autopkgtest-fixes/+merge/208657). 2014-03-05 15:03:45 +00:00
Martin Pitt
3d95702a59 Block packages with unsatisfiable depends and don't run tests for them
In excuse_unsat_deps(), mark unsatisfiable dependencies not just in the HTML,
but also in the invalid_deps list. If we have any of those in
should_upgrade_src(), block the package and don't run the autopkgtest. This
avoid running tests for known-uninstallable packages, which just leads to
guaranteed failures, manual intervention of re-running tests after it becomes
installable, and spamming maintainers with a FAIL/PASS notification.
2014-02-27 18:40:50 +01:00
Niels Thykier
3dc4a6367f Write "HeidiResultDelta" file containing the changes of the run
Based on Colin Watson's code to do the same from the "britney2-ubuntu"
repository[1] revision 306, 308 and 309.

Notable differences include:
 * output include version of source package being removed
 * output prefix removals with a "-" (otherwise it would be identical to
   a upgrade/new source with the change above).

[1] http://bazaar.launchpad.net/~ubuntu-release/britney/britney2-ubuntu/revision/306

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-01-11 09:03:16 +01:00
Niels Thykier
36da23b5b7 britney.py: Remove obsolete comment about AIEEE
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-12-15 05:13:12 +01:00
Ivo De Decker
0214b41a4f Add note when a pkg is being removed because it is not in sid
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-12-11 21:56:51 +01:00
Niels Thykier
f9d2d78734 util: Add new "write_excuses" function
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-12-11 21:21:15 +01:00
Ivo De Decker
c971474945 handle export for excuse with 'force' 2013-12-11 21:21:15 +01:00
Ivo De Decker
e109b446df add remove reason when package not in unstable 2013-12-11 21:21:13 +01:00