On the client side, this metadata is made available via the TargetMeta class. Note that Client.check_for_updates() only ever returns a TargetMeta instance for the archive, regardless of whether a patch update or a full update will be performed.
For example (same as before):
...
new_archive_meta = client.check_for_updates()
if new_archive_meta:
...
if new_archive_meta.custom:
...
Internally, the
custom
metadata object is separated into auser
object and atufup
object.Casual users of tufup should not notice any difference:
targets.json
is changed (see example below)TargetMeta.custom
attribute is replaced by acustom
property, which handles backward compatibilityTargetMeta.custom_internal
property.Examples
On the repo side (same as before):
The custom metadata ends up in the
targets.json
file as follows (different from before):On the client side, this metadata is made available via the
TargetMeta
class. Note thatClient.check_for_updates()
only ever returns aTargetMeta
instance for the archive, regardless of whether a patch update or a full update will be performed.For example (same as before):
fixes #99