87 Commits

Author SHA1 Message Date
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
0d5c4a24c4 Handle Build-Depends-Indep in excuses
Admittedly, no policy adds them yet so this is currently no-op code.
However, future commits can start to rely on this infrastructure code.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-08 16:18:02 +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
206d5ac5df Fix typo in parameter
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-04 20:08:16 +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
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
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
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
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
Paul Gevers
fd03083ea5
Merge branch 'master' into autopkgtest 2017-11-28 20:19:48 +01:00
Niels Thykier
5c3229467a write_heidi: Include cruft arch:all packages in the output
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-19 21:47:38 +00:00
Niels Thykier
7217c22b42 get_dependency_solvers: The "foo:any" modifier can also appear in B-D relations
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-12 11:46:17 +00:00
Niels Thykier
bda39f8ca0 Support :native in build-dependency relations
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-12 07:50:49 +00:00
Niels Thykier
ee27d7a67c Add BuildDependsPolicy to check Build-Depends(-Arch) availability
Add a new "BuildDependsPolicy" that will check the satisfiability of
the build-dependencies listed in the Build-Depends and
Build-Depends-Arch fields.  This enables gating of packages based on
missing / broken build-dependencies.

There are some limitations:

 * Build-Depends-Indep is ignored for now.  Missing or broken packages
   listed in Build-Depends-Indep will be continue to be silently
   ignored.

 * Being a policy check, it does not enforce "self-containedness" as
   a package can still migrate before a build-dependency.  However,
   this can only happen if the build-dependency is ready to migrate
   itself.  If the build-dependency is not ready (e.g. new RC bugs),
   then packages build-depending on it cannot migrate either (unless
   the version in testing satisfies there requirements).

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-11 15:49:48 +00:00
Niels Thykier
c537f0554f Move PolicyVerdict to britney2.policies 2017-11-02 19:31:11 +00:00
Niels Thykier
784d80ab4c Replace a few lists with sets
We basically use them as sets and do not need to rely on the ordering,
so we might as well just turn them into proper sets.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-02 19:30:40 +00:00
Paul Gevers
77bb15e0e8
Plug in the new autopkgtest policy 2017-09-08 11:06:33 +02:00
Niels Thykier
9ca5f7e24e Add more verdicts to provide more detailed excuses
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-13 19:37:53 +00:00
Niels Thykier
d7a676d074 Aggregate all migration decisions and present it in excuses
With this change, Britney can now provide a very brief summary of the
migration via one single value (YAML) or line (HTML).  This solves two
issues:

 * It provides an aggregated version of the policy decision without
   having to loop over all policies (and even those would not give
   a full verdict on their own as not all rejections come from
   policies)

 * It enables a simple way to inform readers of the HTML excuses of
   whether a rejection is permanent or not.  This should hopefully
   make it easier for contributors to understand Britney and react
   more pro-actively.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-13 19:37:53 +00:00
Niels Thykier
f40a7f41b3 Replace dontinvalidate with forced
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-13 19:37:53 +00:00
Niels Thykier
e6e221ad52 Extract a compile_nuninst and move it to utils
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:33:39 +00:00
Niels Thykier
eaf4660918 utils: Replace explicit loop index handling with enumerate
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:33:21 +00:00
Niels Thykier
06504f2ae7 Move invalidate_exuses to utils
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:22:22 +00:00
Niels Thykier
7a63784876 Move get_dependency_solvers to utils
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:03:40 +00:00
Niels Thykier
c4be8436db Move read_sources_file to utils
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:03:40 +00:00
Niels Thykier
9ca30aac81 Rename a variable for clarity reasons
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:06 +00:00
Niels Thykier
241b17602d utils: Remove condition that is always true
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:06 +00:00
Niels Thykier
20c2b87833 Sprinkle some "no cover" pragmas over the code base
Add some "no cover" to some unrecoverable exceptions
(e.g. misconfiguration) or base-class methods that are not intended to
be invoked.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:39:46 +00:00
Niels Thykier
2d8a471f70 undo_changes: Simplify case for virtual packages
doop_source never (no longer?) creates an element in "virtual" where
the package name is prefixed with "-", so we can drop that branch.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:46 +00:00
Niels Thykier
1f1086b929 utils: Replace a case of b[FOO] with b.foo
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:46 +00:00
Niels Thykier
2ce2d7efb3 utils: Remove reundant VERSION=VERSION parameter
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:46 +00:00
Niels Thykier
dd426c81fa Remove dead case in undo code
The doop_source method does not generate any /binary/ undo items,
where the package name starts with "-".  This fact allows us to remove
a branch in the undo code.  This also happens to be fortunate because
the call to "inst_tester.remove_testing_binary" in that branch happens
to be wrong.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:45 +00:00
Niels Thykier
c86e1f7e9c britney: Skip architectures not listed in Release files
As a side effect, remove mips64el from NEW_ARCHES as we no longer need
that as a work around.

Closes: Debian/britney2#12
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:45 +00:00
Niels Thykier
9bc94db01c Refactor all modules into a britney2 subdir
That way they are all contained.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 08:02:00 +00:00