Add OstreeRepo option for an out-of-band cache dir

This allows you to have a writable cache dir even for a system-owned
repository.

Closes: #250
Approved by: cgwalters
This commit is contained in:
Alexander Larsson authored and Colin Walters (automation) committed 2016-04-14 15:55:08 +00:00
1 parent b787fce612
commit 9e7e594907
8 files changed
+81 -1

No files matched your search

+16 -1
View File
@@ -21,7 +21,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh
echo "1..6"
echo "1..7"
COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}"
setup_fake_remote_repo1 "archive-z2" "${COMMIT_SIGN}"
@@ -91,6 +91,21 @@ assert_has_file repo/tmp/cache/summaries/origin
assert_has_file repo/tmp/cache/summaries/origin.sig
echo "ok prune summary cache"
cd ${test_tmpdir}
repo_reinit
mkdir cachedir
${OSTREE} --repo=repo pull --cache-dir=cachedir origin main
assert_not_has_file repo/tmp/cache/summaries/origin
assert_not_has_file repo/tmp/cache/summaries/origin.sig
assert_has_file cachedir/summaries/origin
assert_has_file cachedir/summaries/origin.sig
rm cachedir/summaries/origin
${OSTREE} --repo=repo pull --cache-dir=cachedir origin main
assert_not_has_file repo/tmp/cache/summaries/origin
assert_has_file cachedir/summaries/origin
echo "ok pull with signed summary and cachedir"
cd ${test_tmpdir}
repo_reinit