796 Commits

Author SHA1 Message Date
Mehdi Dogguy
6ecb711860 Typo fix 2011-10-19 20:02:29 +00:00
Adam D. Barratt
b9ac7af03b When auto-hinting, also try a "minimal" package set
The minimal set is comprised of only the first level of (reverse)
dependencies, before any further iterations of packages are added to
the set.  In some cases, the result of the full iteration will contain
packages which cause problems when migrated but the minimal set,
although possibly a less optimal solution, may be able to migrate
successfully.

It is assumed that migrating the larger set of packages will be
preferred if possible, so minimal sets are tried later.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-19 18:23:52 +00:00
Niels Thykier
4235b92460 Reduced Britney.parser to a local variable
Britney.parser was not used outside __parse_arguments, so there
is little use in keeping it alive as an instance variable.
2011-10-19 12:14:02 +02:00
Niels Thykier
0537a47589 Fixed some weird indentations 2011-10-19 11:49:25 +02:00
Niels Thykier
22a9427c21 Removed some unused local variables and arguments 2011-10-19 11:40:11 +02:00
Niels Thykier
7ef794fa21 Removed two unused methods, check_installable and check_conflicts 2011-10-19 11:30:45 +02:00
Niels Thykier
9f12113822 Clarified how britney is compiled 2011-10-19 10:35:10 +02:00
Mehdi Dogguy
672deaae7c Remove obsolete files 2011-10-18 20:28:08 +00:00
Julien Cristau
c8684fc319 Typo fix 2011-10-16 19:39:24 +02:00
Adam D. Barratt
94071b1649 Don't consider intra-source dependencies for smooth updates
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-13 20:22:33 +00:00
Adam D. Barratt
02ab64272c hints: rename the "hints" method to the more helpful "search".
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 20:26:36 +00:00
Adam D. Barratt
3731b62958 Migrate "packages[0]"-style code to the package and version properties.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 19:46:38 +00:00
Adam D. Barratt
ffccdae624 A failed unblock hint should list that hint's user, not the block's
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 19:00:59 +00:00
Adam D. Barratt
a5e448fd27 hints: support package and version properties.
Each property returns the value of the corresponding property for the first
entry in the package list; this is a handy short-cut for hints where there
will only ever be one package in the list (e.g. "age-days", "unblock").

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 18:58:14 +00:00
Adam D. Barratt
76a83ae527 Fix some brown paper bag bugs in the hint parsing code.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 18:24:54 +00:00
Adam D. Barratt
ef2fc7750f hints: allow hints to be stringified
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 18:24:26 +00:00
Adam D. Barratt
2401e90bce hints: fix up hint parsing code for age-days
string.split()'s second argument specifies the maximum number of times
the string should be split, not the maximum number of elements in the
result.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 17:05:35 +00:00
Adam D. Barratt
25a3dd851e Move hint-using code to using HintCollection and HintItem
In order to make a number of the changes required for the migration simpler,
we also complete the previous migration to using {Hint,Migration}Item rather
than passing around strings representing packages and converting between
the two forms in several places.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 16:41:33 +00:00
Adam D. Barratt
870c939e3f migrationitem: add support for using items as indexes in to lists
In order to provide the support, items may now be tested for equality
and hashed.  Two items are considered equal if they have the same
unversioned name (and version, if appropriate); hashing is based on
a tuple hash of the name and version.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 16:36:40 +00:00
Adam D. Barratt
8665dba100 migrationitem: allow instances to be stringified
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 16:34:58 +00:00
Adam D. Barratt
7700e229cd hints: allow more properties to be used for filtering the hint list
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 16:23:06 +00:00
Adam D. Barratt
5a7a0cbe0a hints: export the user associated with a hint via a property
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 16:21:10 +00:00
Adam D. Barratt
41c72a3644 migrationitem: apply some fixes to the version-derivation code
The major change is reversing the order of three-part item names (i.e.
binNMUs with version information included) to use the more traditional
ordering of <src>/<arch>/<ver>.

Even if an instance is marked as versionned, passing a non-versionned
source package name should not cause a traceback.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 16:17:39 +00:00
Adam D. Barratt
02a9aa14ef migrationitem: add an "unversioned name" property
This can be used to retrieve the version information from a versionned hint;
for unversionned hints, it is effectively a synonym for "name".

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-04 16:15:03 +00:00
Adam D. Barratt
0c2c672bb2 Add initial version of Hint/HintCollection classes.
These classes encapsulate information about individual hints, with
HintCollection providing a convenient wrapper around a set of hints.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-09-01 18:15:34 +00:00
Adam D. Barratt
a03e72ffe0 migrationitem: allow for the specification of version information.
The new convenience HintItem class automatically sets the "this item contains
version information" flag when creating a new item.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-31 20:07:35 +00:00
Adam D. Barratt
3dcb9464cf Migrate most code parsing package names to use MigrationItems.
The use of MigrationItem allows us to centralise the parsing and splitting of
package names and architectures, avoiding duplication and simplifying a
number of conditions.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-31 19:55:22 +00:00
Adam D. Barratt
8013ade2de MigrationItem: new class representing a single package being migrated.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-31 19:52:05 +00:00
Adam D. Barratt
606568f675 Grammar / spelling fix some comments
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-28 21:45:14 +00:00
Adam D. Barratt
5682922d34 Bring the author and version information in sync with reality.
The software hasn't been "alpha" for some time.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-28 21:28:47 +00:00
Adam D. Barratt
eda7ce8839 Update a comment to account for proposed-updates support.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-28 21:25:38 +00:00
Adam D. Barratt
3933823a74 Add myself to the copyright information.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-28 21:22:31 +00:00
Adam D. Barratt
fe37b57c91 Better document the new auto-hinter functionality.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-28 21:19:05 +00:00
Adam D. Barratt
7666c5e2d5 Make the auto-hinter more intelligent.
Rather than only considering pairs of packages, we start from a "leaf"
package (i.e. one with an excuse which declares no dependencies on
other packages' excuses) and recursively build a list of packages
which are the dependency or reverse dependency of a package already
in the list.

Any list which is a subset of another list is ignored and the remaining
items are then processed as "easy" hints.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-27 08:50:14 +00:00
Adam D. Barratt
1d6e6617e2 Sort dependency list when outputting an excuse.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-04 08:37:51 +00:00
Adam D. Barratt
7ad9eb0b35 Avoid marking more valid excuses as impossible.
Previously we could not reliably detect whether an excuse's dependency
from a source package to a binNMU was valid, as the excuse did not
contain sufficient information to determine the set of  architecture(s)
on which the dependency existed.

By modifying the representation of the dependency list in the excuse to
include an architecture list we can walk the relationships in reverse
in order to sanity-check the source -> binNMU dependency.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-03 20:53:38 +00:00
Adam D. Barratt
72c5d612eb Avoid marking some valid excuses as impossible.
When considering an excuse for pkg1/arch, a dependency on either of
pkg2/source or pkg2/arch should be considered acceptable so long
as there is a corresponding excuse.

Dependencies from pkg1/source to pkg2/arch will still be considered
"impossible", as pkg1's excuse does not contain any information
regarding the architecture(s) on which its dependency to pkg2 exists.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-02 18:46:17 +00:00
Adam D. Barratt
b15232e352 Stop referring to impossible dependencies as "unpossible".
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-08-02 17:36:03 +00:00
Adam D. Barratt
9c968fd220 Fix up p-u optionality
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-07-27 16:14:52 +00:00
Adam D. Barratt
bea99287e5 Make reading of pu package lists optional
This allows the consideration of packages from proposed-updates to be
{dis,en}abled depending on whether the configuration file specifies
the path to the packages / sources files.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-07-27 09:42:40 +00:00
Adam D. Barratt
6abb29a8e6 Merge and re-factor some pu and tpu tests
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-07-27 09:38:27 +00:00
Adam D. Barratt
b3d9254492 Add initial support for pulling updates from stable-proposed-updates
This is most likely to be useful near the beginning of a release cycle,
when the versions of a package in stable and testing are the same and
the new version of the package is unable to migrate from unstable for
some reason.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-07-27 09:30:00 +00:00
Adam D. Barratt
c0e15035d1 Make a variable name more descriptive (first -. circular-first)
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-07-27 08:43:02 +00:00
Adam D. Barratt
ad527d48a1 Enhance the auto-hinter to support non-circular dependencies
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-07-27 08:41:17 +00:00
Adam D. Barratt
db6ccbf438 Simplify (and fix) logic for assigning section "faux" to fake sources 2011-07-24 08:44:05 +00:00
Philipp Kern
a088234d3c britney.py: turn on unbuffered writing 2011-07-23 18:40:03 +00:00
Adam D. Barratt
ead5fba6ce TODO: fix typoes; thanks, Julien Cristau 2011-07-06 18:31:45 +00:00
Adam D. Barratt
6fc79a8048 TODO: obsolete in favour of the BTS 2011-07-06 18:26:55 +00:00
Adam D. Barratt
e4e53d3404 TODO: Remove completed items 2011-07-06 16:29:41 +00:00
Adam D. Barratt
daa08df3c4 Fix typoed method name. Thanks, Julien Cristau. 2011-06-30 17:45:44 +00:00