582 Commits

Author SHA1 Message Date
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
Niels Thykier
7051d5b0e9 Rewrite installability tester
The new Installability Tester (IT) module replaces the remaining
C-parts.  Unlike C-implementation, it does not give up and emit an
"AIEEE" half-way through.

In order to determine installability, it uses two sets "musts" and
"never".  As the names suggest, the sets represents the packages that
must be (co-)installable with the package being tested and those that
can never be co-installable.  For a package to be installable, "musts"
and "never" have remain disjoint.

These sets are also used to reduce the number of alternatives that are
available to satisfy a given dependency.  When these sets are unable
to remove the choice completely, the new IT defers the choice to later.
This occasionally reduces backtracking as a later package may conflict
or unconditionally depend on one of the remaining alternatives.

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-11-27 19:46:59 +01:00
Niels Thykier
cf84bcfa58 Defer building the nun-inst cache
This is needed for the next commit, where the "per-arch"
installability tester disappears.

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-11-27 19:46:59 +01:00
Adam D. Barratt
69b3154d79 Apply various typo and clarity fixes
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-09-18 20:40:00 +00:00
Adam D. Barratt
f2f9939f20 Remove the C library placeholder for "pre-depends"
We stopped populating the element with real data some time ago, it's
time to drop it entirely.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-09-18 10:00:04 +00:00
Colin Watson
b9f6417351 Support :any architecture qualifiers for multiarch
Multiarch adds a Depends: foo:any syntax, permitted only if the
target of the dependency is "Multi-Arch: allowed".  This has
been supported by dpkg and apt for some time and is now safe to
use in unstable.

[Adam D. Barratt: adjusted to use consts.py]

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-09-17 20:07:38 +00:00
Adam D. Barratt
253590ba27 Update copyright
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-09-07 18:21:00 +00:00
Adam D. Barratt
1b89f7fa22 Rename make_hintitem() to make_migrationitem()
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-09-07 18:19:17 +00:00
Adam D. Barratt
f284e76cc4 Make MigrationItems versionned by default
As HintItem is now redundant, also replace it with a new class -
UnversionnedMigrationItem - and migrate users of the classes to use
the new versions.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-09-07 17:01:58 +00:00
Adam D. Barratt
909dd08542 Replace uses of MigrationItem with HintItem
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-09-07 16:59:06 +00:00
Niels Thykier
c91cfe64ae Reduce the number of "used-once" lists
Where possible, avoid creating a list only to discard immediately
afterwards.  Example:

"""
  for x in sorted([x for x in ...]):
      ...
"""

Creates a list, passes it to sorted, which generates a new list and
sorts that copy.  Since sorted accepts an iterable, we can avoid the
"inner" list and just pass it a generator expression instead.

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-08-11 15:23:45 +02:00
Niels Thykier
6c81d39c2f Move newlyuninst to britney_util
Also, renamed it for consistency with the other X_uninst functions.

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:04 +02:00
Niels Thykier
9ad010f924 Move eval_uninst to britney_util
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:04 +02:00
Niels Thykier
680457cbec Move write_heidi to britney_util
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:04 +02:00
Niels Thykier
bf9362be83 Move {read,write}_nuninst to britney_util
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:04 +02:00
Niels Thykier
1c144b3eb2 Move get_reverse_tree into britney_util
Rename get_reverse_tree and move it to britney_util with slightly
different arguments.

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:04 +02:00
Niels Thykier
0aa2546956 Move the package loop into register_reverses
By moving the package loop inside register_reverses, it will be
invoked a lot less (reducing the overhead of invoking functions).

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:04 +02:00
Niels Thykier
5c1391da4f Move register_reverses to britney_util
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:04 +02:00
Niels Thykier
d9b20ef0ab Add container filters and use it to refactor get_reverse_tree
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:04 +02:00
Niels Thykier
de68ec6fb8 Merge get_reverse_tree and get_full_tree
Beside some "minor differences" they were computing the same "tree"
(read: "graph"), so merge them into one (get_reverse_tree) and
properly document return value and special cases.

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:03 +02:00
Niels Thykier
9771c454b3 Move old_libraries_format to britney_util
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:03 +02:00
Niels Thykier
6d6e735bac Move "undo_changes" to britney_util
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:03 +02:00
Niels Thykier
dd056f8901 Move "constants" to a new consts module
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:03 +02:00
Niels Thykier
4b33e763a0 Move same_source to separate module
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:03 +02:00
Niels Thykier
d86d88f44f Remove unused write_bugs
The method was last invoked in 2008 (commit 3dc3be1c7).

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-10 20:01:03 +02:00
Niels Thykier
2493520e98 britney: Do not consider "smooth-updates-only" interesting
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-09 18:11:22 +02:00
Niels Thykier
f7373c5fe1 britney: Refactor arguments of method
Rewrite the arguments of find_upgraded_binaries to not use an instance
of MigrationItem.  We want to call it at a time where we have not
created MigrationItems yet.

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-09 18:11:22 +02:00
Niels Thykier
f1e653796b britney: Refactor a part of doop_source into its own method
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-09 18:02:55 +02:00
Niels Thykier
2a046dcd93 Migrate to python2.7
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-07 15:37:15 +02:00