530 Commits

Author SHA1 Message Date
Niels Thykier
3230d1dc75 britney.py: Fix use before assignment
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:10 +02:00
Niels Thykier
a13386ae34 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
11e84d01a3 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
3710980b10 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
Ivo De Decker
3a05c6ba91 Also make sure forced-reason is a list
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
d127ac65ae Fix silly NameError
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Ivo De Decker
14107520d7 Make sure reason is a list, even with python 3
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
62c1c9ec3c Add explicit encoding to all files
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
f64f7072c0 Sources and Packages are utf-8
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
7b0138ecb7 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
e8c84e8cc7 Use python3-style super() 2015-04-26 18:20:10 +02:00
Julien Cristau
c42fbcc5d3 Remove dependency on six
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
8044667ed6 Use python3
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
71b21083b7 Use super() instead of explicitly calling our superclass
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
49f37a8965 Disable a code path for encoded yaml in python3
The comment says we should no longer need that.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
b354afc39d 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
ba981aabc2 Add sort method to MigrationItem
write_excuses wants them sorted, and python3 doesn't allow sorting
arbitrary objects.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
d75813eb07 Stop using string.find
It's gone in python3

Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
1e1f574f8a 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
63ccd53759 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
Julien Cristau
b3aef7fe6d Stop using dict.iter* methods
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
c580fb7683 Use python3-compatible form for except clause
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
24e8e9337c Replace map() with list comprehensions
As a bonus this removes a use of string.strip (not in python3).

Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
49475f79ba Simplify a bit the loop to read our config file
- split the one-liner into a for and an if
- use open() as a context manager
- don't use string.strip which is gone in python3

Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
b64afb639f Don't use the file builtin
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
5d7393cf86 Switch to print_function
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
726bbde3a3 Remove sys.path frobbing
I don't think this has been necessary since we stopped loading a C
extension.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
bf1d91d587 Fix typo
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Jonathan Wiltshire
d0d17dac5b britney.conf: NOBREAKALL amd64 in addition to i386
Signed-off-by: Jonathan Wiltshire <jmw@debian.org>
2015-04-25 20:03:48 +00:00
Adam D. Barratt
8d97761dec britney{,_nobreakall}.conf: remove kfreebsd
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2015-04-24 05:11:42 +00:00
Niels Thykier
4b195907f2 britney.conf: Allow kfreebsd packages to go out of sync
Done as kFreeBSD is not a release architecture and it has started to
block migration of release related changes.  I have kept it out of
"BREAK_ARCHES" as I do not yet see a reason to add it there.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-12-17 22:51:33 +01:00
Niels Thykier
b2cef666f4 britney: Ignore "remark" hints as they are not meant for us
The "remark" hint is only intended for showing up in the output of "d"
(or via hint grep).  It has no effect on Britney's behaviour.

Admittedly, the original code would have ignored it as well.  But this
change makes it explicit and not simply a "ignored due to insufficient
permissions".

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-11-23 19:19:33 +01:00
Adam D. Barratt
1725f63f26 Sync britney_nobreakall.conf with the main configuration
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2014-11-13 22:36:08 +00:00
Ivo De Decker
b7f3100b91 excuses: show cruft and missing builds
For out-of-date binaries, generate different excuses when the build is
missing, or when old (cruft) binaries for previous version are still around.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2014-11-08 11:33:05 +00:00
Ivo De Decker
70c4a7cc55 Link to the freeze policy for blocked packages
Don't tell people to mail debian-release.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2014-11-07 15:21:22 +00:00
Julien Cristau
a61dc9103f Revert "Set all urgencies to 10 days"
No longer necessary during the freeze, since they'll need an unblock
anyway, at which point age can be adjusted as well if necessary.

This reverts commit 6891fa39f63d649fb90111ce778c6a5e1e0c317c.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2014-11-05 22:47:05 +00:00
Julien Cristau
4e0756e7ca Make arm64 and ppc64el regular archs
And reorder the list alphabetically.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2014-11-03 23:09:05 +01:00
Julien Cristau
a29ef77cc2 Disable smooth updates
We don't want new library transitions during the freeze.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2014-11-02 17:10:58 +01:00
Jonathan Wiltshire
60393b6746 Set all urgencies to 10 days
As agreed in the Jessie timetable, mandatory 10-day
ageing is in place for the freeze, starting today.

Signed-off-by: Jonathan Wiltshire <jmw@debian.org>
2014-10-05 09:09:17 +00:00
Adam D. Barratt
f516b38256 Don't remove arch:all binaries when migrating *pu binNMUs
As part of a migration, we remove all the existing binaries built by
the source (possibly on a particular architecture) from testing; this
includes architecture-independent binary packages. However, when a
binNMU is in *pu, only the arch-dependent binary pakcages are present.

As a result, after the migration the architecture-independent packages
are no longer present in testing. This usually isn't a practical
problem, as dak will re-add them when it generates the packages files.

It is, however, wrong and will break if a source migration is tempted
during the same run as (and after) the *pu binary migration happened.

The simple fix is to not remove the architecture-independent packages
when performing such migrations.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2014-09-21 15:50:50 +00:00
Andreas Barth
15a2796cfe add arm64 ppc64el 2014-09-14 21:33:53 +00:00
Niels Thykier
3c91f65f1f britney.py: Fix bug where nuninst would be copied incorrectly
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-23 10:56:20 +02:00
Niels Thykier
666dd187e4 britney.py: Fix a regression in nuninst counting for hints
In the rare case that a hint removed an uninstallable binary, the
binary could still be included in the nuninst counter.

Regression introduced in a46dd88.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-07 19:56:19 +02:00
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