[ostree] pull-local: Write detached metadata into the correct repository
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] pull-local: Write detached metadata into the correct repository
- Date: Tue, 22 Jul 2014 20:35:23 +0000 (UTC)
commit 9bd229dff58ddb96f08e9307a1a668efc3548db5
Author: Colin Walters <walters verbum org>
Date: Tue Jul 22 15:42:56 2014 -0400
pull-local: Write detached metadata into the correct repository
We want to write to the dest repo, not src.
Noticed while reviewing this code for some other bug.
https://bugzilla.gnome.org/show_bug.cgi?id=733579
src/ostree/ot-builtin-pull-local.c | 2 +-
tests/test-basic.sh | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/ostree/ot-builtin-pull-local.c b/src/ostree/ot-builtin-pull-local.c
index b5b5728..50b05a6 100644
--- a/src/ostree/ot-builtin-pull-local.c
+++ b/src/ostree/ot-builtin-pull-local.c
@@ -91,7 +91,7 @@ import_one_object (OtLocalCloneData *data,
if (detached_meta)
{
- if (!ostree_repo_write_commit_detached_metadata (data->src_repo,
+ if (!ostree_repo_write_commit_detached_metadata (data->dest_repo,
checksum, detached_meta,
cancellable, error))
goto out;
diff --git a/tests/test-basic.sh b/tests/test-basic.sh
index e078385..5bac71c 100755
--- a/tests/test-basic.sh
+++ b/tests/test-basic.sh
@@ -326,6 +326,8 @@ rm repo2 -rf
mkdir repo2
${CMD_PREFIX} ostree --repo=repo2 init
${CMD_PREFIX} ostree --repo=repo2 pull-local repo
+ostree --repo=repo2 show --print-detached-metadata-key=SIGNATURE test2 > test2-meta
+assert_file_has_content test2-meta "HANCOCK"
echo "ok pull-local after commit metadata"
cd ${test_tmpdir}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]