633 Commits

Author SHA1 Message Date
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
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
Niels Thykier
3f4f1b4c23 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
d626dee30c 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
917b848455 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
b0ce8b4b7f 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
19b5063cea 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
74aa9dfea8 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
76b2449c1e 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
f6ba71d0e9 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
4f29a4334c 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
1107844e8b 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
ba0cdde697 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
6a360858ea "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
b5cc598a8f 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
87ac94dbdb 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
e80ee4bcf6 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
498c8fe9f6 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
e6f861b664 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
85387e9a37 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
8641af1c24 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
Adam D. Barratt
edd0302c97 Drop some unused imports
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-29 14:31:38 +00:00
Adam D. Barratt
ca97a1830c Merge branch 'master' into p-u 2011-10-28 17:37:26 +00:00
Adam D. Barratt
036d8be9d0 Don't try to call __log on a non-existent class
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-27 20:50:12 +00:00
Adam D. Barratt
d3b027c461 Drop unused import
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-27 20:48:12 +00:00
Adam D. Barratt
b85db2b308 Fix-up a broken merge so smooth updates work again
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-22 19:58:07 +00:00
Adam D. Barratt
6667b8fcf9 Merge branch 'master' into p-u
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-22 19:48:55 +00:00
Adam D. Barratt
120f783dfd 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-22 19:46:09 +00:00
Adam D. Barratt
48866b513e Don't consider intra-source dependencies for smooth updates
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-22 19:41:51 +00:00
Adam D. Barratt
aeca75b99d Remove an unused variable
(part of 22a9427c21b6216e093252ba77e09d5f10e436f7 from master)

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-22 19:38:26 +00:00
Niels Thykier
91baa5a4d6 Removed two unused methods, check_installable and check_conflicts 2011-10-22 19:37:13 +00:00
Niels Thykier
504a7c2d61 Allow a list as well as a tuple in Britney.do_hint 2011-10-22 19:30:00 +00:00
Adam D. Barratt
0e50a0ef44 Fix up broken logic so that binary removals work again
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-22 19:28:09 +00:00
Adam D. Barratt
d62f8f6bcc smooth updates: pass a list of MigrationItems to remove, not strings
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-22 19:26:57 +00:00
Adam D. Barratt
0fa6e4c3fb Make sort_actions support MigrationItems
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-22 19:25:43 +00:00
Adam D. Barratt
4ddb92db21 Fix up the addition of "unblock" hints for t-p-u approvals.
Thanks to Niels Thykier for the original idea.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2011-10-22 14:47:00 +00:00
Niels Thykier
e71016c5a0 Fixed tab-completion for packages containing "-"
Also fix broken tab-completion after the first "/".
2011-10-22 14:09:35 +02:00
Niels Thykier
efca307f71 Added package completion to the readline completor 2011-10-22 13:42:14 +02:00
Niels Thykier
575adfc307 Do not crash if writing histfile fails with --hint-tester
It does not affect the result and only means the user does not
have any readline-history.
2011-10-22 10:26:10 +02:00
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