deltas: Add a timestamp to delta metadata
This commit is contained in:
parent
f526fd4e3c
commit
60c4d467aa
|
|
@ -365,10 +365,15 @@ ostree_repo_static_delta_generate (OstreeRepo *self,
|
|||
metadata_source = tmp_metadata;
|
||||
}
|
||||
|
||||
delta_descriptor = g_variant_new ("(@(a(ss)a(say))aya(ayttay))",
|
||||
{
|
||||
GDateTime *now = g_date_time_new_now_utc ();
|
||||
delta_descriptor = g_variant_new ("(@(a(ss)a(say))taya" OSTREE_STATIC_DELTA_META_ENTRY_FORMAT ")",
|
||||
metadata_source,
|
||||
GUINT64_TO_BE (g_date_time_to_unix (now)),
|
||||
g_variant_builder_new (G_VARIANT_TYPE ("ay")),
|
||||
part_headers);
|
||||
g_date_time_unref (now);
|
||||
}
|
||||
|
||||
if (!ot_util_variant_save (descriptor_path, delta_descriptor, cancellable, error))
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ ostree_repo_static_delta_execute_offline (OstreeRepo *self,
|
|||
FALSE, &meta, error))
|
||||
goto out;
|
||||
|
||||
headers = g_variant_get_child_value (meta, 2);
|
||||
headers = g_variant_get_child_value (meta, 3);
|
||||
n = g_variant_n_children (headers);
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ G_BEGIN_DECLS
|
|||
*
|
||||
* delta-descriptor:
|
||||
* metadata: a{sv}
|
||||
* timestamp: guint64
|
||||
* ARRAY[(csum from, csum to)]: ay
|
||||
* ARRAY[delta-part-header]
|
||||
*
|
||||
|
|
@ -70,7 +71,7 @@ G_BEGIN_DECLS
|
|||
* recursion mechanism that would potentially allow saving significant
|
||||
* storage space on the server.
|
||||
*/
|
||||
#define OSTREE_STATIC_DELTA_META_FORMAT "(a{sv}aya" OSTREE_STATIC_DELTA_META_ENTRY_FORMAT ")"
|
||||
#define OSTREE_STATIC_DELTA_META_FORMAT "(a{sv}taya" OSTREE_STATIC_DELTA_META_ENTRY_FORMAT ")"
|
||||
|
||||
gboolean _ostree_static_delta_part_execute (OstreeRepo *repo,
|
||||
GVariant *header,
|
||||
|
|
|
|||
Loading…
Reference in New Issue