import: optionally pull .verity + .roothash.p7s data when downloading
We already had support for downlading a .nspawn and a .roothash file, let's make the set complete, and also download .verity + roothash.p7s if it exists, as nspawn consumes that. Since there are now four kinds of additional resources to acquire, let's introduce a PullFlags flags value for this instead of separate 'bool' variables, it's just too many to always pass those around on the function parameter list.
This commit is contained in:
@@ -110,7 +110,7 @@ int pull_find_old_etags(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pull_make_local_copy(const char *final, const char *image_root, const char *local, bool force_local) {
|
||||
int pull_make_local_copy(const char *final, const char *image_root, const char *local, PullFlags flags) {
|
||||
const char *p;
|
||||
int r;
|
||||
|
||||
@@ -122,7 +122,7 @@ int pull_make_local_copy(const char *final, const char *image_root, const char *
|
||||
|
||||
p = prefix_roota(image_root, local);
|
||||
|
||||
if (force_local)
|
||||
if (FLAGS_SET(flags, PULL_FORCE))
|
||||
(void) rm_rf(p, REMOVE_ROOT|REMOVE_PHYSICAL|REMOVE_SUBVOLUME);
|
||||
|
||||
r = btrfs_subvol_snapshot(final, p,
|
||||
|
||||
Reference in New Issue
Block a user