387 Commits

Author SHA1 Message Date
Niels Thykier
1641706305 Migrate to python2.7
Signed-off-by: Niels Thykier <niels@thykier.net>
2013-07-07 15:37:15 +02:00
Adam D. Barratt
527d7f03e6 Remove two "the the"s
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-07-06 12:42:52 +00:00
Adam D. Barratt
141d62cca1 Correct a thinko in a comment in should_upgrade_srcarch()
A removal hint will generate both source and per-arch excuses if the
version of the source package differs between testing and unstable. If
the source versions are the same then only the per-arch excuses will
be generated.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-07-06 11:26:11 +00:00
Adam D. Barratt
6d8aec3a6a Improve comments in should_upgrade_srcarch()
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-07-06 11:21:53 +00:00
Colin Watson
33d905fc3a Apply undo list in reverse order.
In rare cases with hints with overlapping virtual packages provided by
different sources, this can make a difference.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-07-05 18:06:40 +00:00
Colin Watson
e99ea14601 Don't crash on unversioned unblock hints.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-07-05 18:04:33 +00:00
Adam D. Barratt
84bad954ad Only record a package once in the source->binary package mapping
If there are multiple versions of an arch:all package in unstable (due
to outdated or no longer built arch:any packages) then only one of them
should be recorded in the list of binary packages built from the source
package. Otherwise we may try and remove the binary package from various
lists multiple times, leading to crashes.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-07-01 18:13:51 +00:00
Adam D. Barratt
9ee37c5160 Enable support for p-u packages
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-06-12 19:39:27 +00:00
Adam D. Barratt
a58f6d72c9 Ensure that binNMUs from superseded sources are not considered
Given a source which provides two packages and has different versions
in testing and unstable, binNMUs in unstable corresponding to the
older source version should not be considered as migration candidates.

For example:

testing
-------

source 1
bin 1 arch1
bin 1 arch2

unstable
--------

source 2
bin 2 arch1
bin 1+b1 arch2

The binary migration on arch2 should not be considered a candidate.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-06-08 15:40:07 +00:00
Adam D. Barratt
c7f27a8225 Re-enable smooth-updates
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-05-05 11:09:37 +00:00
Adam D. Barratt
858e8de218 same_source: handle being passed "None" as a version
Although this should never happen, rather than crashing if one of the
versions is none, simply indicate that they are unequal.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-03-17 10:33:59 +00:00
Adam D. Barratt
7933a720aa Completer: add "approve" to the command completion
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-03-16 17:19:49 +00:00
Adam D. Barratt
ce72b31bc6 Completer: offer tpu packages when completing "approve" hints
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-03-16 17:19:01 +00:00
Adam D. Barratt
af86002dea Completer: copyright foo
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-03-16 17:12:04 +00:00
Adam D. Barratt
c345dea3b5 Completer: when processing a "remove", only offer packages from testing
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-03-16 17:10:11 +00:00
Adam D. Barratt
de56c719b6 Completer: add forgotten "remove" to command completion
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-03-16 16:59:19 +00:00
Adam D. Barratt
d9a9a26c57 Completer: support all hints
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-03-16 16:39:23 +00:00
Adam D. Barratt
0463c666f0 write_excuses: clear the list of excuses before building
Although this isn't an issue during normal runs, the excuses might be
built multiple times during a hint-tester run and should not accumulate
during the run.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-03-16 16:31:04 +00:00
Adam D. Barratt
33bc6cb7fb hint_tester: accept all hints
For those hints which don't cause an immediate run (i.e. other than
easy, hint and force-hint), re-build the excuses after adding the
hint so that the actions are accounted for in later hints.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-03-16 16:30:18 +00:00
Adam D. Barratt
8e72456651 Completer: don't crash if there are candidates in t-p-u
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-03-14 19:58:14 +00:00
Adam D. Barratt
8c15568b8f Don't remove arch:all packages when migrating binNMUs via *pu
A binNMU does not rebuild architecture:all packages. For migrations via
unstable this is not a problem as the packages corresponding to the
source upload are still present. However, for *pu migrations, the set of
packages considered only includes architecture-specific packages. In
order to avoid installability issues with packages in testing which
depend on the arch:all packages, we leave the existing arch:all packages
in testing and only consider the arch-specific packages for migration.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-03-03 17:23:38 +00:00
Adam D. Barratt
2a590ff095 Replace a single-use list in the smooth updates checks with any()
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-02-06 19:56:04 +00:00
Adam D. Barratt
acec4ff6e3 Use any() in tpu o-o-d checks rather than throwaway lists
The test only needs to consider whether any binaries exist on a given
arch, not how many of them there are (or indeed which binaries they are)

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-02-06 19:09:04 +00:00
Adam D. Barratt
25cc2c3b36 Split the tpu o-o-d checks up to make them more readable
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-02-06 19:05:16 +00:00
Adam D. Barratt
9f4af0171e Fix tpu out-of-date checks for sources with multiple versions in tpu
When checking whether a tpu source has built on a particular arch, we
should only consider binaries produced by the latest version of the
source package in tpu.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-02-06 17:18:46 +00:00
Adam D. Barratt
74d1b70096 Don't flag unbuilt binary *pu binNMUs for removal in excuses
Originally when binNMUs for packages in testing were scheduled, the
binaries would be installed into tpu with no accompanying source. This
allowed the "removed binary" portions of should_upgrade_srcarch() to be
skipped (as britney had generated a faux source record).

dak now adds the source package to tpu in such cases which lead to the
"removed binary" checks being applied to binNMUs in tpu with potentially
destructive consequences. For example, if a package with amd64 and i386
binaries in testing were binNMUed on just amd64, britney would notice
that there were no i386 binaries in tpu and subsequently remove the i386
binaries from testing as well.

In order to resolve this, we skip the check for removed binaries when
building excuses for a binary-only migration via *pu.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-02-02 22:47:56 +00:00
Adam D. Barratt
cf79fe5618 Add jmw
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-01-22 13:02:13 +00:00
Adam D. Barratt
67a181d8fc Merge excuses "unblock" parsing for unstable and *pu
The primary difference between the parsing / output of excuses for *pu
and unstable unblocks is the messages displayed. We can therefore remove
some duplication by having the same code handle both, outputting the
appropriate message.

Where a *pu package is also the subject of a "block" (most likely during
a freeze) we only supply the "needs approval" or "approved" message;
previously both "needs approval" and "not touching due to block" were
output, which is redundant. We ensure that there is always a dummy
"block" hint for *pu packages to provide the "needs approval" behaviour.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-01-18 18:52:07 +00:00
Adam D. Barratt
83f25ca602 Remove remaining "approve" hint support code
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-01-18 18:47:06 +00:00
Adam D. Barratt
ce69eb3345 Make "approve" an alias for "unblock"
An "approve" hint is effectively an unblock for tpu packages and britney
is already quiite happy to parse "unblock $pkg/$tpuversion".

We allow the old name to be used for compatibility and replace it with
"unblock" internally.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-01-18 18:42:10 +00:00
Niels Thykier
b0172d74c4 Ignore sources only referenced by Built-Using
Signed-off-by: Niels Thykier <niels@thykier.net>
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2013-01-12 12:31:17 +01:00
Adam D. Barratt
2ccfc4120c Clarify the checks for existing binary packages in doop_source()
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-12-25 22:16:05 +00:00
Niels Thykier
c74ee2878b Always include providers of virtual packages in rdepends
Signed-off-by: Niels Thykier <niels@thykier.net>
2012-12-25 19:58:47 +00:00
Adam D. Barratt
e605091f24 Fix excuse invalidation checks for arch-specific dependencies
A dependency on an arch-specific package which is not a valid candidate
should lead to the depending package not being a candidate.

For now we ensure that the generated excuses output remains the same,
so that we don't have to wait for consumers to adapt to a new format.
Changing the output format should be revisited at a later point.

See Debian bug #693068.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2012-12-25 18:28:14 +00:00
Adam D. Barratt
c5d9a8eaa5 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
d11c40d4b8 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
998d6ee2bc 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
406ca73f26 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
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