459 Commits

Author SHA1 Message Date
Colin Watson
7049af338d Skip date-based processing if Dates is missing. 2012-10-22 13:47:52 +01:00
Colin Watson
ee9bb6c002 Python 2.6 -> 2.7 2012-10-22 13:43:51 +01:00
Adam D. Barratt
a059a18406 Fix thinko in the introduction of "recurse"
"not force and not earlyabort" simplifies to "not earlyabort" rather
than "not force", as an easy hint would set "earlyabort" but not
"force".

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-05-22 21:16:36 +00:00
Adam D. Barratt
ae05fb28db iter_packages(): Replace "earlyabort" with (inverse sense) "recurse"
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-05-22 19:56:11 +00:00
Niels Thykier
90bb65383f Optimize the return value of get_reverse_tree
All callers of get_reverse_tree compute the same modification of its
return value, so move that computation into get_reverse_tree.

Signed-off-by: Niels Thykier <niels@thykier.net>
2012-05-22 15:22:31 +02:00
Niels Thykier
352fd3da08 do_all(): Only collect lundo info if it will be used
Side-effect, "undo" can now be inferred from lundo (being not None),
so it has been removed.

Signed-off-by: Niels Thykier <niels@thykier.net>
2012-05-22 15:22:31 +02:00
Niels Thykier
5d1ee6b57a Simplify codeflow in do_all()
Side-effect, pass lundo as parameter to iter_packages rather than
having it return the value.

Signed-off-by: Niels Thykier <niels@thykier.net>
2012-05-22 15:22:31 +02:00
Niels Thykier
caac9c870a Refactor part of iter_packages into separate method
Signed-off-by: Niels Thykier <niels@thykier.net>
2012-05-22 15:22:31 +02:00
Adam D. Barratt
088c1ed26a Clarify how ages are calculated
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-05-19 20:13:57 +00:00
Niels Thykier
7da22c74ad Merge Pre-Depends into Depends 2012-04-12 00:07:22 +02:00
Adam D. Barratt
a44dd13409 Fix reference to "apt.pkg.ParseDepends" (-> "apt_pkg.parse_depends")
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-04-11 21:45:31 +00:00
Adam D. Barratt
aa882fd805 Fix typo in variable name
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-04-11 21:33:03 +00:00
Adam D. Barratt
a62534e8d0 Don't import "os" multiple times
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-04-11 21:31:00 +00:00
Adam D. Barratt
66b7eca0f0 Make smooth updates slightly more intelligent
When processing a hint of the form "easy pkgX libX" where libX would be
a candidate for smooth updates because pkgX/testing depends on it but
pkgX/unstable does not, and there are no other reverse dependencies,
the old binary from libX can simply be dropped straight away.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-04-11 21:10:28 +00:00
Adam D. Barratt
af7987c561 Fix transposition of arch/suite in tpu "not yet built" links
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-04-10 18:32:27 +00:00
Adam D. Barratt
3bf778550c Fix "block-all source" handling
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-04-03 21:44:32 +00:00
Adam D. Barratt
8ee72661f0 Perform basic sanity checking when reading hints files
The only test currently implemented is to ensure that any prospective
hint contains at least one item beyond the hint name.  This prevents
lines in a hint file consisting simply of e.g. "easy" being added to
the hint list and causing later processing to abort with an error.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-04-01 22:46:05 +00:00
Cyril Brulebois
47c808309b britney: Print the current package to stderr when AIEEEing.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2012-03-05 11:55:41 +00:00
Niels Thykier
5a998ea8a7 britney: Never strip multi-arch in dependencies
This causes Multi-arch dependencies like "pkg:i386" to show up as
unsatisfiable in excuses.

Previously, the dependency would be checked on the wrong architecture
(if available) and cause the package to become a valid candidate.  The
package would still be prevent from migrating as the installability
checker does not know of the "pkg:i386" package.

Signed-off-by: Niels Thykier <niels@thykier.net>
2012-02-10 14:48:01 +01:00
Niels Thykier
9bf3224bd1 Remove some unused fields and methods in excuse
In the unsat_deps case, it was used to update a field in the excuse,
but the field was never read anywhere.

Signed-off-by: Niels Thykier <niels@thykier.net>
2012-01-06 20:52:18 +01:00
Niels Thykier
9a7274db93 Convert all classes to "new-type" Python classes
Signed-off-by: Niels Thykier <niels@thykier.net>
2012-01-06 19:39:57 +01:00
Niels Thykier
ac7afef96b Made is_valid and dontinvalidate properties in Excuse
Use the is_valid in "html"-method to determine whether to write "Valid
candidate" or not.  This avoids the occasional:

 * Valid candidate
 * Invalidated by dependency
 * Not considered

Signed-off-by: Niels Thykier <niels@thykier.net>
2012-01-06 14:58:14 +01:00
Niels Thykier
cd1735492c Read testing data files only once
Signed-off-by: Niels Thykier <niels@thykier.net>
2012-01-04 22:03:06 +01:00
Niels Thykier
c4a8b31edf Completer: use britney.upgrade_me instead of generate_package_list
generate_package_list had the unintended side-effect of regenerating
self.excuses (up top of the original excuses).

Signed-off-by: Niels Thykier <niels@thykier.net>
2012-01-04 16:38:22 +01:00
Niels Thykier
e7689715d2 Removed the notion of "depth" in britney
Presumably there once was a reason for having a notion of "depth",
but these days only 3 "values" were given as "maxdepth":

 * "easy" (for easy hint)
 *  0     (for "main run" or in a "hint"-hint)
 * -1     (for force-hint)

Signed-off-by: Niels Thykier <niels@thykier.net>
2012-01-04 14:20:33 +01:00
Niels Thykier
e7b90af6db Pre-append $B2dir/pythonX(.Y) to sys.path if it exists
This allows britney to load a python2.7 variant of the C module when
run under python2.7.

Note for python3, we add "python3" rather than "python3.Y".  This is
to reflect the include path in the python3 package in the archive.

Signed-off-by: Niels Thykier <niels@thykier.net>
2012-01-04 12:02:12 +01:00
Niels Thykier
b52ff787e0 Removed unused return value from excuse_unsat_dep
Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-29 14:45:14 +01:00
Niels Thykier
20682bfa5b Refactor installability test in iter_packages into separate method
Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-29 14:37:03 +01:00
Niels Thykier
1f87322d5a Make "affected" a set based on the usage of it
"affected" is not allowed to contain duplicates.  Since the current
method of removing any such duplicates is

  affected = list(set(affected))

then the order of affected is not important.

As a side effect, make get_reverse_tree return a set instead of a
list as its return value is always inserted into affected.

Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-29 14:30:51 +01:00
Niels Thykier
4febf18aba Removed compat-mode and (the now redundant) auto-hinter cmd option
Features like the auto-hinter, smooth-upgrades and removal of obsolete
source packages are now unconditionally enabled.

Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-29 14:10:31 +01:00
Niels Thykier
1507f44903 Constant propagate "strict" variable
Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-29 13:54:43 +01:00
Mehdi Dogguy
bc46c1b2f5 Migrate to python-apt 0.7.100 API
Refreshed original patch and added some minor clean up.

Signed-off-by: Niels Thykier <niels@thykier.net>
Closes: #645818
2011-12-18 21:42:14 +01:00
Niels Thykier
e1b98db809 Use "key" instead of "cmp" when sorting excuses
Python3 has deprecated the "cmp" style sorting.

Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-18 21:06:39 +01:00
Niels Thykier
ede3a592a8 Import reduce via functools
In Python3 reduce must be imported from functools, python2.6
supports the import as a "nop".

Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-18 21:06:22 +01:00
Niels Thykier
582eabcb78 Replaced "x.has_key(y)" with "y in x"
"has_key" is no longer supported for dict in python3.

Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-18 14:53:04 +01:00
Adam D. Barratt
46ae57bad4 Remove non-sensical text from should_upgrade_src's docstring
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-12-15 21:31:44 +00:00
Adam D. Barratt
42df75af7b Automatically remove obsolete source packages from testing.
An "obsolete source" is one which produces no binaries.  This situation
generally arises when all of the binaries which used to be produced by
the source package are now built by other sources.

Sooner or later such sources will probably be auto-crufted from unstable,
but there's no real reason to keep them in testing in the meantime.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-12-15 19:26:45 +00:00
Niels Thykier
68f1d17334 Refactored the "undo" code into its own method
Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-13 22:30:16 +01:00
Adam D. Barratt
9b2cfdde3e Consistently format package names when processing hints.
The initial packages of a hint are HintItems, whereas other packages
considered whilst processing the hint will be MigrationItems.  In
either case, the version information is irrelevant during the output
of hint processing and only displaying it for some items is confusing
and distracting.  Therefore, whilst processing a hint we always use
unversioned names.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-12-12 19:47:49 +00:00
Niels Thykier
dc36ca2469 Simplified get_reverse_tree
Removed the "packages" variable from get_reverse_tree as it was just a
"list" variant of "seen".

Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-11 23:34:29 +01:00
Niels Thykier
726bee7714 Removed unused "excluded" argument for some methods
Remove unused "excluded" argument from get_dependency_solvers and
excuse_unsat_deps.  The argument was either always default or an empty
list.

Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-11 22:59:35 +01:00
Adam D. Barratt
57878c9077 Fix brown paper bug handling "hint"s with multiple package initial sets
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-12-07 22:37:49 +00:00
Adam D. Barratt
f5f558818b Switch to using Python 2.6
Simply updating the include in britney-py.c, rebuilding and changing
the shebang of britney.py appears to be enough to make the switch in my
tests, so we just do that for now at least.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-21 19:23:06 +00:00
Adam D. Barratt
45c11a1f57 Support implicit (t)pu hint items
If a hint item references unstable but its version is not correct for
that suite, we compare the version to the (t)pu version (if any) and
if a match is found update the item as if it had been explicitly
specified as applying to that suite originally.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-15 20:50:09 +00:00
Adam D. Barratt
0fbecb9a9e Simplify hint override checking
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-14 19:52:42 +00:00
Adam D. Barratt
9f793fcbec Fix-up hint override logic
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-14 19:15:25 +00:00
Adam D. Barratt
7045c6e549 Pass the list of supported architectures to MigrationItem
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-11 13:30:53 +00:00
Adam D. Barratt
c19f880142 Fix up spacing issues; thanks Niels.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-10 10:30:13 +00:00
Adam D. Barratt
7f9d8ae271 "Broken architectures" fix-up
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-09 22:44:31 +00:00
Adam D. Barratt
2018302e1f Merge branch 'master' into p-u
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-09 10:32:17 +00:00