summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2014-07-22 15:42:56 -0400
committerColin Walters <walters@verbum.org>2014-07-22 15:43:33 -0400
commit9bd229dff58ddb96f08e9307a1a668efc3548db5 (patch)
treed4096d6807719f5526cb0fd18c67560b1bb1e4bf
parentcdaa9517afc5cd85da7c92ffa272417771632a07 (diff)
downloadostree-9bd229dff58ddb96f08e9307a1a668efc3548db5.tar.gz
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
-rw-r--r--src/ostree/ot-builtin-pull-local.c2
-rwxr-xr-xtests/test-basic.sh2
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 b5b5728f..50b05a6f 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 e0783855..5bac71c8 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}