736 Commits

Author SHA1 Message Date
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
Niels Thykier
e63aa05708 Add Suites to keep track of all suites
At the moment, it is just a glorified dict.  However, we will
eventually use it to get rid of the hardcoded references to "testing"
etc. all over the code.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
37f02d611c Revert "Rename autopkgtest related hints"
This reverts commit a07fa9f9070fc9c328021db5cc3e4c4f3063798e.

The new names are just as unhelpful and confusing as the old ones.
Undo for now.
2018-07-25 18:17:36 +00:00
Niels Thykier
a07fa9f907 Rename autopkgtest related hints
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-25 16:51:03 +00:00
Niels Thykier
bfa028595f britney: Leave upgrade_output alone with --dry-run
Closes: https://bugs.debian.org/763521
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-02 18:41:33 +00:00
Niels Thykier
7897942f24 Make UPGRADE_OUTPUT optional
All the output is a duplicate of what is being sent to the root logger
(albeit in a different format) and in e.g. our test suite the output
is entirely redundant.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-02 18:41:33 +00:00
Niels Thykier
d35a831a0c Remove remaining calls to output_write and output_write itself
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-02 18:41:33 +00:00
Niels Thykier
a344a9b375 Rewrite handling of logging old libraries
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-02 18:41:30 +00:00
Niels Thykier
3d05b834ad Refactor logging of uninst
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-02 18:41:25 +00:00
Niels Thykier
ef8c56f189 Migrate output_write to use a logger
With a bit of code we can replace the manual file-handling for
"upgrade_output" with a logger.  This will enable us to refactor other
bits that currently depend on "output_write" by making those bits use
a logger instead.

This also migrates "do_hint" to use the new output logger.  This is
due to "do_hint" being the only method relying on writing of partial
lines and maintaining support for that in "output_write" would have
been non-trivial.

To ensure "pretty" formatting to stdout, the messages in
"output_write" are now chopped into multiple lines.

The only visible change is that the output to stdout from
"output_write" now also includes the prefix with a timestamp.
However, then contents of "upgrade_output" remain unchanged
deliberately.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-02 18:41:25 +00:00
Niels Thykier
9e6fcc0ed3 Avoid lying about orig-nuninst counters in force-hint
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-02 18:41:25 +00:00
Niels Thykier
6d81e0b1fd Drop redundant "Apparently successful"-note
We already know the item is successful when we print it and the next
line ("final:") will confirm it any way.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-02 18:41:25 +00:00
Niels Thykier
8ac55c436c Avoid duplicate pkgs names in ood excuse
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-04-29 10:12:21 +00:00
Niels Thykier
b1e10e0f54 Grant HINTS_HELPERS autopkgtest hints
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-04-29 07:34:14 +00:00
Niels Thykier
92817767b6 Merge remote-tracking branch 'github/autopkgtest' 2018-04-29 07:12:54 +00:00
Paul Gevers
def9d81c76
Make retry URL configurable (two flavors) 2018-04-11 11:17:00 +02:00
Niels Thykier
9030ff4d99 do_all: Simplify the assignments to a variable
At a glance, it looks like the value of "better" variable can be
decided from 3-4 places.  However, due to the code flow only two of
those assignments are truly "live"/useful.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-04-01 10:52:38 +00:00
Niels Thykier
41978869ce Migrate solver's ad-hoc debug logging
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-31 07:04:35 +00:00
Niels Thykier
b478460b96 Merge branch 'master' into autopkgtest 2018-03-31 06:06:15 +00:00
Niels Thykier
1e9fc7e826 britney: Log to stdout by default
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-31 06:05:41 +00:00
Niels Thykier
8eaee4309e Rewrite "self.log -> self.logger.<severity>" for autopkgtest
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-31 05:57:43 +00:00