765 Commits

Author SHA1 Message Date
Niels Thykier
a9ee64470e Always use pkg ids in the InstallabilityTester API
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-13 20:33:06 +02:00
Niels Thykier
2914a8a51b britney.py: Verify nuninst before updating control files
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-13 20:32:49 +02:00
Niels Thykier
7736b53c60 Drop now unused register_reverses and RDEPENDS
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-13 19:33:22 +02:00
Niels Thykier
3d5d328738 Use inst_tester to compute smooth updatable binaries
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-13 19:33:22 +02:00
Niels Thykier
5123bc2317 Remove the now unused RCONFLICTS field
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-09 21:06:06 +02:00
Niels Thykier
289807463e Rewrite computation and testing of "affected" packages
Rely on the Installability tester to locate all of the affected
packages plus their transitive reverse dependencies.  As the
InstallabilityTester is suite agnostic, the set of affected packages
now includes (versions of) packages not in testing, which is filtered
out during the check.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-09 21:06:06 +02:00
Niels Thykier
58edb64c99 Update nuninst correctly for arch:any -> arch:all migrations
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-08 08:07:43 +02:00
Niels Thykier
f3a8181bda britney.py: Fix statement without an effect
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-06 22:39:39 +02:00
Niels Thykier
7c5fdc8aca britney.py: Use "is" rather than "==" for None comparisons
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-06 21:41:45 +02:00
Ivo De Decker
606dbcb470 ignore arch all when looking for up-to-date bins
If we have an up-to-date arch all package available for this architecture,
that doesn't mean this architecture has an up-to-date build. We need an
architecture specific up-to-date package for that.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2015-09-06 19:30:47 +00:00
Ivo De Decker
984b07b58e Don't remove outdated binaries for fucked arches if they are in unstable
For fucked architectures, binaries from older versions are allowed to be in
testing, so we only remove them if they are gone from unstable.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2015-09-06 17:08:32 +00:00
Ivo De Decker
88bf620896 Add option to ignore cruft
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2015-09-06 15:21:30 +00:00
Cyril Brulebois
d2fa0fb07c excuses: New try for block-udeb → d-i RM.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-08-11 22:26:57 +00:00
Cyril Brulebois
d2bdcfc237 Revert "excuses: Point to the d-i release manager when block-udeb is involved."
This reverts commit 6adee798cd0bec3b64c8a6315667d68ab3c16bd9.

Patching the wrong location considered unhelpful.

Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-08-11 22:25:23 +00:00
Cyril Brulebois
6adee798cd excuses: Point to the d-i release manager when block-udeb is involved.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-08-11 21:38:36 +00:00
Niels Thykier
5f98e6b37b Create a clone_nuninst function for iter_packages{,_hint}
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:52 +02:00
Niels Thykier
da83e4cc23 iter_pkg: Refactor nuninst cloning
Move nuninst cloning out of the check loop and always populate the new
nuninst entirely.

This will allow some simplifications in other places.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:52 +02:00
Niels Thykier
0043b09c45 britney.py: Avoid some O(n) look-ups in the auto-hinter
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:52 +02:00
Niels Thykier
843952d627 Avoid O(n^2) duplication handling when building hints
Use a set to filter out seen items to avoid doing O(n^2)
de-duplication.  For very large hints, this can take considerable
time.

Using "seen_items" to build the actual hints on the (unverified)
assumption that Python can do something "smart" to turn a set into a
frozenset faster than it can with a list.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:52 +02:00
Niels Thykier
72eb6af711 britney: Optimise original auto-hinter duplication handling
Britney is now smart enough to produce the same result from hints
regardless of the order of the items in the hint.  With this in mind,
we can have the original auto-hinter produce hints as sets and filter
out duplicates as we produce them.

Note that the hints are sorted to produce deterministic output (to
make it easier to compare the hints between runs and changes).

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:52 +02:00
Niels Thykier
0b9006c36b britney.py: Pre-split self.options.*_arches
We always use them as lists, so we might as well just split them once
and be done with it.
2015-06-02 21:33:52 +02:00
Niels Thykier
bf3aa08023 britney.py: Minor optimisation to sort_actions
Avoid some cases of O(n^2) behaviour in sort_actions and reduce the
size of n for the remaining O(n^2)-ish behaviour by filtering out
removals early on.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:52 +02:00
Niels Thykier
d5cfd5aebd britney.py: Remove redundant arg to format
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:51 +02:00
Niels Thykier
e725647175 Be verbose when rejecting a hint due to invalid candidates
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:51 +02:00
Niels Thykier
d017fe1a8c Remove "leading" from hints - it provides no new information 2015-06-02 21:33:51 +02:00
Niels Thykier
2047eb1e50 Remove unused local variable
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:29:47 +02:00
Adam D. Barratt
b4bed1ca62 britney.py: reverse sense of tests for architecture-indep packages
It's more natural to say "check this package if the current arch is in
this list" than "do not check this package if the current arch is not
in this list"

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2015-04-27 19:43:54 +00:00
Adam D. Barratt
bc037efccb britney.py: typo fixes
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2015-04-27 19:14:08 +00:00
Adam D. Barratt
11eef30869 britney.py: drop inaccurate comment
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2015-04-27 18:50:48 +00:00
Anthony Towns
c7fbe91b2a britney: Take more care with hijacked binaries
This updates the doop_source and _compute_groups functions so
that binary packages that are built from a different source
aren't included as part of an update to the original source.
In the event that it's a binary-only update, also don't remove
the hijacked packages from testing.

This change also removes an obsolete comment regardarding pre-conditions
for the _compute_groups function.
2015-04-26 18:20:11 +02:00
Niels Thykier
d911314c2d britney.py: Enable the new consistency checks by default
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Niels Thykier
0c5651576a britney.py: Skip ESSENTIAL consistency check
The live-data tests rely on an inconsistency, since they were before
Britney started to record the Essential field.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Anthony Towns
c28bc84f57 britney: Check for mismatched packages between suites.
britney assumes that a package build is uniquely described by its
name, version and architecture. Particularly when constructing
Packages files by hand for testing purposes this assumption can be
violated, leading to confusing behaviour. This change makes britney
look for such mismatches, and report if any are found.
2015-04-26 18:20:11 +02:00
Niels Thykier
b4e4ba4681 Collect more statistics from the installability tester
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Niels Thykier
2a34970304 Compute simple stats installability tester graph
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Niels Thykier
074eb46766 Remove unused assignments/parameters
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Niels Thykier
bfb71f966b britney.py: Remove trailing semi-colons
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:10 +02:00
Niels Thykier
8623ffc224 britney.py: Fix use before assignment
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:10 +02:00
Niels Thykier
74060e4e0a britney.py: Avoid some redundancy in auto_hinter()
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:10 +02:00
Niels Thykier
2f663fa7b9 britney: Optimise the original auto-hinter a bit
Notably:
 * Avoid repeated calls frozenset(X), where we can trivially do
   without.
 * Skip the inner loop, when "i" is in "to_skip".
 * Use a set rather than a list for "to_skip" as we do more
   membership tests.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:10 +02:00
Niels Thykier
be1ee0fcd3 get_dependency_solvers: Avoid unnecessary boolean ret value
The get_dependency_solvers method returns a (boolean, list)-tuple, but
the boolean can always be implied from the list (in boolean context).

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:10 +02:00
Julien Cristau
b9f30120ad Fix silly NameError
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
994906c673 Add explicit encoding to all files
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
fb2f30bcef Sources and Packages are utf-8
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
d86c7b9c7a Don't crash if the urgencies file contains non-ascii
The live-2011-12-13 test set has random garbage in the middle.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
6c344589ee Remove dependency on six
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
354f6a6bc9 Use python3
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
18f7101847 Use six.moves for itertools, urllib and intern
They're renamed in python3.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
90f5993c4a Use the key= argument to sorted()
cmp is gone in python3.  Also add a sorting method to Excuse that is
compatible with its __eq__/__hash__ methods.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
c79c0848e5 Stop using sys.maxint
It doesn't exist in python3, but 1000 days should be safe enough as a
fallback for a package without urgency.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00