importd: add support for downloading sysext/confext/portable images too

This adds "Ex" versions of all bus calls import implements, that make
two changes:

1. A "class" parameter is added that allows choosing between
   machine/sysext/confext/portable images to download. Depending on the
   chose class the target directory is selected differently (i.e. not
   just /var/lib/machines/, but alternatively /var/lib/portables/,
   /var/lib/extensions/, /var/lib/confexts/.

2. The boolean flags are replaced by a 64bit flags parameter.
This commit is contained in:
Lennart Poettering
2024-03-01 22:25:42 +01:00
parent 83d7411209
commit 7af5785d77
15 changed files with 473 additions and 106 deletions
+2 -6
View File
@@ -37,11 +37,9 @@ int pull_find_old_etags(
int r;
assert(url);
assert(image_root);
assert(etags);
if (!image_root)
image_root = "/var/lib/machines";
_cleanup_free_ char *escaped_url = xescape(url, FILENAME_ESCAPE);
if (!escaped_url)
return -ENOMEM;
@@ -128,11 +126,9 @@ int pull_make_path(const char *url, const char *etag, const char *image_root, co
char *path;
assert(url);
assert(image_root);
assert(ret);
if (!image_root)
image_root = "/var/lib/machines";
escaped_url = xescape(url, FILENAME_ESCAPE);
if (!escaped_url)
return -ENOMEM;