summaryrefslogtreecommitdiff
path: root/src/ostree/ot-builtin-static-delta.c
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2016-11-24 15:59:36 +0100
committerAtomic Bot <atomic-devel@projectatomic.io>2017-02-27 22:10:26 +0000
commit64422a7d0beb5243d051320cc94c14324b845049 (patch)
treedc5ecf861b8fb1575a045e63df4ebee1e8eebd4c /src/ostree/ot-builtin-static-delta.c
parent9695c476846684098ad454fcbe06a370fe92d63e (diff)
downloadostree-64422a7d0beb5243d051320cc94c14324b845049.tar.gz
deltas: Expose the filename parameter
The C API (ostree_repo_static_delta_generate) knows what to do with it, but this parameter was never exposed via command line tool. Closes: https://github.com/ostreedev/ostree/issues/695 Closes: #703 Approved by: jlebon
Diffstat (limited to 'src/ostree/ot-builtin-static-delta.c')
-rw-r--r--src/ostree/ot-builtin-static-delta.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ostree/ot-builtin-static-delta.c b/src/ostree/ot-builtin-static-delta.c
index c8843a65..1019f06f 100644
--- a/src/ostree/ot-builtin-static-delta.c
+++ b/src/ostree/ot-builtin-static-delta.c
@@ -33,6 +33,7 @@ static char *opt_min_fallback_size;
static char *opt_max_bsdiff_size;
static char *opt_max_chunk_size;
static char *opt_endianness;
+static char *opt_filename;
static gboolean opt_empty;
static gboolean opt_swap_endianness;
static gboolean opt_inline;
@@ -71,6 +72,7 @@ static GOptionEntry generate_options[] = {
{ "min-fallback-size", 0, 0, G_OPTION_ARG_STRING, &opt_min_fallback_size, "Minimum uncompressed size in megabytes for individual HTTP request", NULL},
{ "max-bsdiff-size", 0, 0, G_OPTION_ARG_STRING, &opt_max_bsdiff_size, "Maximum size in megabytes to consider bsdiff compression for input files", NULL},
{ "max-chunk-size", 0, 0, G_OPTION_ARG_STRING, &opt_max_chunk_size, "Maximum size of delta chunks in megabytes", NULL},
+ { "filename", 0, 0, G_OPTION_ARG_STRING, &opt_filename, "Write the delta content to PATH (a directory). If not specified, the OSTree repository is used", "PATH"},
{ NULL }
};
@@ -322,6 +324,9 @@ ot_static_delta_builtin_generate (int argc, char **argv, GCancellable *cancellab
if (opt_inline)
g_variant_builder_add (parambuilder, "{sv}",
"inline-parts", g_variant_new_boolean (TRUE));
+ if (opt_filename)
+ g_variant_builder_add (parambuilder, "{sv}",
+ "filename", g_variant_new_bytestring (opt_filename));
g_variant_builder_add (parambuilder, "{sv}", "verbose", g_variant_new_boolean (TRUE));
if (opt_endianness || opt_swap_endianness)