653 Commits

Author SHA1 Message Date
Adam D. Barratt
5ec47a0e72 Remove two unused variables from iter_packages()
The code using the variables was refactored in 694d614b. As a result
they were still set in iter_packages() but never subsequently used.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-12-24 20:32:23 +00:00
Adam D. Barratt
9f3e1630b4 Make obsolete source package removal slightly more intelligent
Previously a package which became obsolete during a run would not be
automatically removed until the next run. This was due to the fact that
sources[][BINARIES] is not updated during the run. Instead, we build a
list of source packages which produce at least one binary and then
remove any packages not in that list.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-12-15 18:07:06 +00:00
Adam D. Barratt
4955efb6d7 Disable new smooth updates
Setting SMOOTH_UPDATES to a string which is neither a valid section
name (nor the magic string "ALL") should allow removal of old libraries
to continue without any new smooth updated libraries being accepted.

An empty SMOOTH_UPDATES would also stop removals from occurring.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-07-02 22:13:59 +00:00
Adam D. Barratt
5feba8c03f Sync with live configuration
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-06-21 17:43:31 +00:00
Adam D. Barratt
226b779afd 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
4a0b6ac068 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
689204a958 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
94c8b3a411 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
5f6244e70e 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
694d614b6b 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
1159e2b642 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
82b9eda016 Merge Pre-Depends into Depends 2012-04-12 00:07:22 +02:00
Adam D. Barratt
86bde62017 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
19c61e4503 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
ef78fb34b2 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
bff12b1883 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
5ba953a78d 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
c571e8fdba 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
da69fb39ca 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
319f5ef9eb lib/dpkg.c: Keep noise related to AIEEEs to a minimum.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2012-03-05 12:13:21 +00:00
Cyril Brulebois
6e701a09cd 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
3e9c1acb8e 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
Adam D. Barratt
d1d5d9826e Merge branch 'master' of file:///srv/release.debian.org/git/britney2 2012-01-08 12:36:03 +00:00
Adam D. Barratt
a4f91cce41 Drop closing li tag from "valid candidate" messages
Although it's technically correct, none of the other messages include closing
tags, and at least grep-excuses isn't prepared to deal with closing tags.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-01-08 12:34:55 +00:00
Niels Thykier
edbd7f4563 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
d41bf54585 Convert all classes to "new-type" Python classes
Signed-off-by: Niels Thykier <niels@thykier.net>
2012-01-06 19:39:57 +01:00
Adam D. Barratt
1b0a85d879 Make Excuse a new-style class, so property decorators work as expected
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-01-06 15:21:14 +00:00
Niels Thykier
ed905b99c7 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
85221000eb Read testing data files only once
Signed-off-by: Niels Thykier <niels@thykier.net>
2012-01-04 22:03:06 +01:00
Niels Thykier
44352da611 Re-added support for completing removals in tab-completer
The broken "do_hint" was caused by lack of versions in the resulting
hint.

Signed-off-by: Niels Thykier <niels@thykier.net>
2012-01-04 18:07:45 +01:00
Niels Thykier
8a1a43c965 Fixed the tab-completer in hint-tester
It was temporarily broken by commit 5814723.

Signed-off-by: Niels Thykier <niels@thykier.net>
2012-01-04 17:59:04 +01:00
Niels Thykier
5814723a08 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
8900680cb1 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
1c95bec3e9 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
5dc2888597 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
ed21179110 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
f48897a3ba 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
de8765e918 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
e26bc23818 Constant propagate "strict" variable
Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-29 13:54:43 +01:00
Niels Thykier
05c9979233 Removed even more stuff from dpkg.c
Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-27 11:39:57 +01:00
Niels Thykier
c9160d4ac3 Even more garbage collection of dpkg.c and even some of dpkg-lib.c
Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-26 15:04:56 +01:00
Niels Thykier
8bf3c3d606 More code removal from dpkg.c
Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-25 22:55:50 +01:00
Niels Thykier
7b96c2dfcd Removed unused C-API from dpkg.h
Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-25 22:42:44 +01:00
Niels Thykier
6774ed6877 Fixed a typo in the doxygen.conf file
Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-23 11:16:32 +01:00
Mehdi Dogguy
cabb9deec0 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
a717404f0d 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
4a1bee1fc9 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
b15a93459c 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
beecac6f4d 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
9327529ba8 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