Changing the suite requires update the item's canonical names, as these
need to reflect the new suite.
The property() function only applies to new-style classes, so we also
need to update MigrationItem to be new-style.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This allows us to re-canonicalise the item's name if any of the item's
properties are altered without updating its name.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This relies on the caller supplying a list of valid architectures, and
assumes that none of the list entries are also valid version strings.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
Although multiple formats of item name are accepted (e.g.
$pkg_$suite/$arch and $pkg/$arch_$suite), for compatibility and ease of
parsing by clients the output format is standardised.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
In order to provide the support, items may now be tested for equality
and hashed. Two items are considered equal if they have the same
unversioned name (and version, if appropriate); hashing is based on
a tuple hash of the name and version.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
The major change is reversing the order of three-part item names (i.e.
binNMUs with version information included) to use the more traditional
ordering of <src>/<arch>/<ver>.
Even if an instance is marked as versionned, passing a non-versionned
source package name should not cause a traceback.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This can be used to retrieve the version information from a versionned hint;
for unversionned hints, it is effectively a synonym for "name".
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
The new convenience HintItem class automatically sets the "this item contains
version information" flag when creating a new item.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>