706 Commits

Author SHA1 Message Date
Niels Thykier
65b67e763c
Replace the use of inst_tester with new suite functionality
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:20 +00:00
Niels Thykier
03df891b7e
Expand the Suite interface and create a TargetSuite sub-class
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:19 +00:00
Niels Thykier
07a407e810
Partly separate the solver from the inst_tester
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:14 +00:00
Niels Thykier
0a669461ca
Separate inst_tester from universe
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:12 +00:00
Niels Thykier
35b06ee007
tests: Separate inst_tester from universe
This commit updates the test suite to use the BinaryPackageUniverse
instead of the InstallabilityTester where that makes sense.  The rest
of Britney has yet to be updated except where absolutely necessary (as
that will come in a later commit).

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:11 +00:00
Niels Thykier
b37575f000
Stop creating some throw-away data-structures for a method call
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-01 21:30:24 +00:00
Ivo De Decker
b839e1a459
Ignore dependencies of cruft when building excuses.
Don't make dependencies of cruft a blocker for being a candidate. In most
cases, the cruft won't migrate to testing, so it shouldn't be a blocker. If
the cruft would be considered for migration to testing, the installability
check will catch missing deps.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-10-30 19:40:37 +00:00
Niels Thykier
7cdf10bc77
Inline get_nuninst into its remaining callees
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-10-28 21:37:41 +00:00
Niels Thykier
05aaf1cc12
Refactor nuninst initialization to avoid reading the cache from disk
At the moment, britney will always read the nuncache from disk
(possibly regenerating it before reading it).  However, we can save
the "read from disk" by moving the initialization of nuninst into the
constructor of Britney and relying on clone_nuninst.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-10-28 21:35:18 +00:00
Niels Thykier
7bcbcb6282
Make clone_nuninst able to fully deep clone nuninst
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-10-28 21:26:48 +00:00
Niels Thykier
6c5300d873
Unfold the suite.binaries tuple into two members
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-10-25 18:34:41 +00:00
Ivo De Decker
9c606ef533 Don't add smooth-updatable cruft to migration items
Based on patch by Niels Thykier.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2018-10-24 22:15:27 +00:00
Niels Thykier
7fd15eab4f
britney: Use chain rather then duplicate statement
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-30 16:31:21 +00:00
Niels Thykier
e279eabf0a
britney.py: Remove duplicated variable
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-30 16:03:02 +00:00
Niels Thykier
f561de89d0
britney.py: Remove an unnecessary level of indentation
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-30 12:57:07 +00:00
Niels Thykier
880a614b2b
britney: Extract a find_smooth_updateable_binaries function
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-30 12:57:06 +00:00
Niels Thykier
7d7a42153d
britney.py: Simply a loop in should_upgrade_src
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-30 12:19:39 +00:00
Niels Thykier
fc834624fc Avoid some unnecessary hash look ups
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-12 08:37:07 +00:00
Niels Thykier
208c3c2e90 britney: Use direct and indirect affected packages for nuninst checks
Previously, we split affected into a "reverse relations with a
dependency on the migrated/change package" set and a set of "the
rest".  With this commit we change the sets into a set of packages
with a direct relation on the migrated/changed package and the full
set of all affected.

The change has no effect on Britney's results as the first set is only
used as an optimization to reject some items faster.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-09 17:46:31 +00:00
Niels Thykier
1623828a48 SourcePackage: Add field for Build-Depends-Indep
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-08 16:18:02 +00:00
Niels Thykier
70947f4c21 Use excuses_suffix instead of name for items
At the moment, the two are identical, but they are not intended to
remain identical (i.e. the name should eventually become the full
suite name).

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-07 20:43:48 +00:00
Niels Thykier
1d45b2a3b2 Move autopkgtest specific field to Autopkgtest policy
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-07 19:28:25 +00:00
Mathieu Trudel-Lapierre
8d2cabd914 Add 'unsatisifiable dependencies' to YAML excuses
Cherry-Pick: 80bf9060de6b7a7fe21f10da90f0dcc15b96ac1c
Cherry-Pick: f32907aceab7bdf37856ceef3122149c046f0ee1
Cherry-Pick: 9ef496177f86b18d9f910da1360dd773b82f1fb7
Cherry-Pick: b16530a37df93851fda35db016775056a6b0c218
Signed-off-by: Niels Thykier <niels@thykier.net>

Flatten the defaultdict(set) for unsat_deps into a standard dict for output
2018-08-07 18:55:57 +00:00
Niels Thykier
94dc17c0d7 britney: Remove {sources,binaries} from Britney 2018-07-29 09:27:20 +00:00
Niels Thykier
4a2fe3420a Rewrite write_controlfiles to take a single suite as argument
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:27:20 +00:00
Niels Thykier
97d707e5c0 britney: Avoid some references to britney.{sources,binaries}
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:27:20 +00:00
Niels Thykier
dfbff18b5c Remove some references to "unstable"
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
54e5eb0e74 policies: Use suite class instead of suite name
When determining whether a policy applies to a given item, use the
suite class rather than the suite name.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
e7b5339eae britney.py: Replace an instance of 'pu'/'tpu' hardcoding
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
7ed3568eca britney.py: Remove two more references to "testing"
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
d5224f78cd Refactor excuse_unsat_dep and make it suite agnostic
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
861632e270 Make upgrade_testing suite agnotic (except for its name)
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
63c867995b write_heidi: Accept a target suite instead of sources+packages
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
609bb9e960 Make migration and undo code suite agnotisc
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
382ced2a68 Make write_excuses suite agnostic
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
9a7394c89d britney: Rewrite should_* to be (almost) suite agnostic
The "almost" comes from the fact that there is a reference to
"pu"/"stable" which does not have an obvious fix at the moment.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
9a5c0c3fa8 Rewrite old_libraries to be suite agnostic
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
b3bfda7d6c britney.py: Make loading of constraints+faux pkgs suite agnostic
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
7b38fbed91 britney.py: Avoid hardcoding "testing" in some log messages
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
64d2bc4203 builder.py: Make the code suite agnostic
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
d0399f4eb0 britney.py: Make get_nuninst suite name agnostic
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
f464baa257 Move the "binary" field from Britney to Suite
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
0c6314b466 read_binaries: Use the suite object
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
3e930174ab Make autohinter suite name agnostic
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
d2836b15d4 Rewrite do_hint without hardcoding suite names
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
73f4f3a5dd Suites now have a reference to sources
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
d1350606bb Use a proper Suite object for MigrationItem.suite
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
21528f6f0c Refactor to avoid empty "pu" and "tpu" data structures
Previously, we would always create empty data structures for "pu" and
"tpu" if these optional suites were not configured.  However, we only
reference "pu" and "tpu" directly in very few spots that can easily be
rewritten.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
8768e2a02a Define a SuiteClass to classify suites
Into 3 categories:

 * target suite ("testing")
 * primary source suite ("unstable")
 * additional source suites ("pu" and "tpu")

This will be useful for implementing logic working with suites without
basing it on the name of the suite.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
b63ade583c Rename and turn SuiteInfo into a proper class
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00