316 Commits

Author SHA1 Message Date
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
Niels Thykier
68304a8b72 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
bdaf40775a 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
11f40f1f17 More code removal from dpkg.c
Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-25 22:55:50 +01:00
Niels Thykier
7eff120867 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
84b24ec1d2 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
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
6f705b9585 Purged unused code from lib/britney-py.c
Signed-off-by: Niels Thykier <niels@thykier.net>
2011-12-14 09:52:10 +01: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
Julien Cristau
991ac4d1d6 Update INSTALL for python2.5 → 2.6 switch
Signed-off-by: Julien Cristau <jcristau@debian.org>
2011-12-12 10:30:59 +01: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
2031288ead MigrationItem: use Python 2.6 property decorators for name / suite
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-27 18:18:53 +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
56afba5d4b MigrationItem: make the "suite" property read/write
Changing the suite requires update the item's canonical names, as these
need to reflect the new suite.

The property() function only applies to new-style classes, so we also
need to update MigrationItem to be new-style.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-15 20:45:51 +00:00
Adam D. Barratt
b635769606 MigrationItem: rename _build_name() to _canonicalise_name()
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-15 20:15:49 +00:00
Adam D. Barratt
994097e0fb MigrationItem: separate item name parsing from canonicalisation
This allows us to re-canonicalise the item's name if any of the item's
properties are altered without updating its name.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-15 20:13:03 +00:00
Adam D. Barratt
1180c8bdeb Merge branch 'p-u' 2011-11-14 21:20:31 +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
a2ba758279 Hint: implement equality based on comparing string representations
This will work for "single package" hints, but should be extended to
consider "easy foo/1 bar/1" and "easy bar/1 foo/1" to be equivalent.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-14 19:13:16 +00:00
Julien Cristau
eb0498be93 Ensure package list contains exactly one item in convenience methods
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-14 18:29:43 +00:00
Adam D. Barratt
111d6b791a Syntax tweak
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-14 18:28:32 +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
6672c96db3 MigrationItem: support "$pkg/$ver/$arch" syntax
This relies on the caller supplying a list of valid architectures, and
assumes that none of the list entries are also valid version strings.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-11 13:28:04 +00:00
Adam D. Barratt
9ce1baad18 HintCollection::search(): fix "onlyactive" logic
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-10 12:50:01 +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
bdba8dfbde MigrationItem: fix name output for removal items
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-09 23:31:56 +00:00
Adam D. Barratt
31651fafd7 MigrationItem: canonicalise item names on output
Although multiple formats of item name are accepted (e.g.
$pkg_$suite/$arch and $pkg/$arch_$suite), for compatibility and ease of
parsing by clients the output format is standardised.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-09 23:24:42 +00:00
Adam D. Barratt
06410e37bd Correctly parse foo/arch/ver in unversionned mode
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-09 22:44:55 +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
Adam D. Barratt
9e840cd78a Drop zobel's hint file
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-08 15:09:00 +00:00
Adam D. Barratt
fb3cee8207 Make it clearer that single binary removal is an implementation detail
The feature is used to remove binaries left by smooth-updates and is not
exposed as an available hint type.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-06 13:18:52 +00:00
Adam D. Barratt
197e46db1c Merge branch 'master' into p-u
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-05 16:13:33 +00:00
Adam D. Barratt
edf2355984 Don't add a "full" auto-hint if the package list is the "minimal set"
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-05 16:02:05 +00:00
Adam D. Barratt
3ca167d396 Merge branch 'master' into p-u
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-02 20:04:13 +00:00
Adam D. Barratt
9de352892a Make checking for smooth updates candidates smarter
Commit 94071b16491e90d78605791a316141b58cc3c6fc excluded intra-source
dependencies from the determination as to whether a binary package was
eligible for smooth updates.  Whilst this works in many cases, there
are situations where it breaks migration.  For instance:

  foo depends on libdropped1
  libdropped1 depends on libdropped2
  libdropped1 and libdropped2 are built from the same source; foo from
     another source
  libdropped2 is otherwise leaf in testing

In order to resolve this, we build a list of all packages which might
be eligible and filter out those which have reverse-dependencies outside
of their source package.  For each remaining package, we consider it
eligible if its intra-source reverse-dependencies are within the list
of packages already determined to be eligible.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-11-02 19:32:30 +00:00
Adam D. Barratt
9e2f0af8d4 Ensure _package and _uvname attributes are always defined
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-29 17:17:42 +00:00
Adam D. Barratt
e9d0971e49 Fix odd spacing
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-29 17:14:00 +00:00
Adam D. Barratt
e68e1b0451 Use the correct (and existing) variable in an error message
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-29 14:32:26 +00:00