815 Commits

Author SHA1 Message Date
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
f83029c55e 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
36d3b96158 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
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
Julien Cristau
2eee806263 Stop using dict.iter* methods
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
16f77bf6f9 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
4249d3868a 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
94666b55f9 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
58a6a6ed1d Don't use the file builtin
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
94f18322db Switch to print_function
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Julien Cristau
6371eaf102 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
20ffcc6dc5 Fix typo
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:09 +02:00
Jonathan Wiltshire
48b4021aa2 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
bf87fb7d63 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
59f099d080 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
9d5f47a9b7 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
629a596f25 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
371ad09113 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
0e90214698 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
31ba6fc228 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
26936d1876 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
213f9ad0e8 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
6891fa39f6 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
09f7ab83cf 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
d51fa09c75 add arm64 ppc64el 2014-09-14 21:33:53 +00:00
Niels Thykier
ef45659797 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
97fcba644c 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
bae9338a74 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
822d847c11 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
04afa83ad8 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
a2d63a1c73 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
d93f299fe5 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
f88bcd98a2 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
0714b3bed8 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
4383fe93a5 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
12691baa87 Exploit equivalency to skip unneeded computation
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:33 +02:00
Niels Thykier
37608071e9 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
2576366dd0 inst-tester: Attempt to avoid needing to backtrack
When trying to break a choice, try the candidate out and see if we can
pick it without any consequences.  Basically, if the candidate causes
no new conflicts or choices, we can safely pick it.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:16 +02:00
Niels Thykier
4babb75f8f inst-tester: Exploit eqv. table in compute_testing_installability
Use the equvilence table to skip some calls to _check_inst.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:16 +02:00
Niels Thykier
72daebd67c installability: Exploit equvialency to reduce choices
For some cases, like aspell-dictionary, a number of packages can
satisfy the dependency (e.g. all aspell-*).  In the particular
example, most (all?) of the aspell-* look so similar to the extent
that reverse dependencies cannot tell two aspell-* packages apart (IRT
to installability and co-installability).

This patch attempts to help the installability tester by detecting
such cases and reducing the number of candidates for a given choice.

Reported-In: <20140716134823.GA11795@x230-buxy.home.ouaza.com>
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:03 +02:00
Niels Thykier
e9a7a07856 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
baa9eebc5c 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
a46dd88709 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
c25e7f9cd7 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
Niels Thykier
4009d1b244 inst/builder.py: Move a comment and write doc for method
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-07-19 09:51:36 +02:00
Niels Thykier
e45f2fe84e 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
d63b5a95d8 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
Niels Thykier
8251b56e66 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
791b71d441 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