Ivo De Decker
62c309da07
Don't allow unversioned migrationitems to be hashed
...
Unversioned migration items match different versioned items for the same
source, so hashing them will not produce a correct result.
Closes : #945471
2020-01-30 18:41:21 +01:00
Ivo De Decker
76dc7cc0d2
MigrationItem: calculate (uv)name
...
Caclulate the (uv)name of the items, instead of accepting it from other
functions.
2020-01-30 18:40:24 +01:00
Niels Thykier
32ebe9d4e0
Ensure get_auto_hinter_hints does not choke on cruft items
...
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-21 20:34:58 +00:00
Niels Thykier
04318473f6
Simplify MigrationItem.parse_item by extracting a method
...
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-31 12:00:54 +00:00
Niels Thykier
542f030a96
Remove now obsolete code from MigrationItem
...
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-31 12:00:53 +00:00
Niels Thykier
61d3068de6
Move suite name auto-correction to MigrationItemFactory
...
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-31 12:00:52 +00:00
Niels Thykier
eec7b9b7ef
MigrationItem: Remove setter for "name"
...
It is no longer used and would prevent the removal of global state in
the MigrationItem class.
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-31 12:00:51 +00:00
Niels Thykier
6174d2c3f9
Create a MigrationItemFactory and migrate most code to use it
...
This is a step towards making migration unit-testable. This step
reduces the need for global state (in the MigrationItem class as class
fields) and with another step we can remove the global state entirely
and enable unit tests to create migration items without having to
worry about other unit tests.
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-31 12:00:50 +00:00
Ivo De Decker
f0ddfc253f
Fix parsing of migration item name for binNMU in tpu
...
The parsing of migration items should also look for the suite name in the
architecture part. This fixes the parsing for migration items like
some-src/amd64_tpu and some-src/amd64_tpu/1.0-1
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2018-12-11 14:37:55 +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
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