760 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Niels Thykier
1306eb664d 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
afa9a543b1 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
2079b1fb5e 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
d90681eca2 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
643b1098d1 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
Niels Thykier
d359759e9d Move "old_libraries" to britney_util
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-03-10 18:48:04 +01:00
Niels Thykier
5ddd9ebc36 Move write_controlfiles to britney_util
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-03-10 18:48:04 +01:00
Niels Thykier
b429d4871e Factor write_sources into its own function
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-03-10 18:48:04 +01:00
Niels Thykier
691bda4bd8 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
7f471eca25 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
9345e9f6fe 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
a378bb6060 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
87813401bf handle export for excuse with 'force' 2013-12-11 21:21:15 +01:00
Ivo De Decker
a037c189e9 add remove reason when package not in unstable 2013-12-11 21:21:13 +01:00
Ivo De Decker
68d2d54663 first attempt at adding reason 2013-12-10 22:27:32 +01:00
Ivo De Decker
6a7aeac400 add bug list to yaml 2013-12-10 22:27:32 +01:00
Ivo De Decker
ab4de3b93c first attempt at yaml logging 2013-12-10 22:26:26 +01:00
Ivo De Decker
9d79ce7297 if hintsdir is defined, read hints from there
This introduces a new variable HINTSDIR, which overrides the location of the
Hints dir (normally it is read from the UNSTABLE dir).

Please note that this is the location of the dir that contains the Hints dir.

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-12-06 22:45:01 +01:00
Ivo De Decker
cd242ff453 read hints earlier
This allow to do quicker test of the code that reads the hints.

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-12-06 22:44:56 +01:00
Ivo De Decker
581204696c if outputdir is defined, write dates file there
This introduces a new variable OUTPUTDIR, which overrides the location where
the new dates file is written. This allow to run britney against a read-only
copy of the data.

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-12-06 22:44:50 +01:00
Julien Cristau
7eef861a15 Fix urgency reading to obey 'low'
Set the default to maxint until we've read something.

Reported-by: Ivo De Decker <ivo.dedecker@ugent.be>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-12-02 20:48:06 +01:00
Julien Cristau
7966ceae1a Change the default urgency setting to medium
But don't force urgency to medium for new packages, they can still be
low.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-12-01 19:01:19 +01:00
Niels Thykier
ea4e4493a2 Remove the old installability tester
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-11-27 19:54:22 +01:00