| |
@@ -57,6 +57,10 @@
|
| |
esac
|
| |
}
|
| |
|
| |
+ work_tmpdir=$(mktemp -d -p /var/tmp --suffix=.sync-ostree)
|
| |
+ trap "{ rm -rf $work_tmpdir }" EXIT
|
| |
+ cd "${work_tmpdir}"
|
| |
+
|
| |
for name in "${ostree_base_images[@]}"; do
|
| |
echo "Processing: ${name}"
|
| |
# The base name component, e.g. "fedora-silverblue"
|
| |
@@ -72,8 +76,8 @@
|
| |
aliased_name=${imgname}:${tagname}
|
| |
fi
|
| |
|
| |
- work_dir=$(mktemp -d -p /var/tmp --suffix=.sync-ostree)
|
| |
- pushd ${work_dir} &> /dev/null
|
| |
+ mkdir $name
|
| |
+ pushd $name &> /dev/null
|
| |
# Note that this command will use the current architecture
|
| |
arch=$(arch)
|
| |
if ! runv skopeo inspect -n docker://${primary_imgtag} > inspect.json; then
|
| |
@@ -134,7 +138,7 @@
|
| |
runv buildah manifest push --all "${imgtag}" ${target}
|
| |
# If we have an alias, synchronize that
|
| |
if test -n "${aliased_name}"; then
|
| |
- runv skopeo copy docker://${target} docker://${canonical_registry}/${aliased_name}
|
| |
+ runv skopeo copy ${target} docker://${canonical_registry}/${aliased_name}
|
| |
fi
|
| |
# And handle secondary registries
|
| |
echo "Copying to secondary registries"
|
| |
@@ -146,7 +150,7 @@
|
| |
done
|
| |
echo "done synchronizing ${name}"
|
| |
popd
|
| |
- rm "${work_dir}" -rf
|
| |
+ rm "${name}" -rf
|
| |
done
|
| |
|
| |
echo "done"
|
| |
sync-ostree: Clean up on exit
We noticed a space leakage on failures.
Signed-off-by: Colin Walters walters@verbum.org
sync-ostree: Remove duplicate
docker://
in alias pathThis caused a failure for rawhide.
Signed-off-by: Colin Walters walters@verbum.org