checkout: Add --allow-noent option
This is useful for the gnome-ostree build system where each build is one commit, but it's split up into /runtime /devel /debug etc. trees. Ideally we wouldn't have a /debug subdirectory for "noarch" components for example. So add an option to not error out if the given path doesn't exist in the commit.
This commit is contained in:
1 parent
f4327cc6a0
commit
c60c70e9a9
2 files changed
+29
-3
No files matched your search
+12
-1
@@ -19,7 +19,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
echo "1..28"
|
||||
echo "1..30"
|
||||
|
||||
. libtest.sh
|
||||
|
||||
@@ -208,3 +208,14 @@ rm -rf test2-checkout
|
||||
parent_rev_test2=$(ostree --repo=repo rev-parse test2)
|
||||
${CMD_PREFIX} ostree --repo=shadow-repo checkout "${parent_rev_test2}" test2-checkout
|
||||
echo "ok checkout from shadow repo"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
rm -f expected-fail
|
||||
$OSTREE checkout test2 --subpath /enoent 2>/dev/null || touch expected-fail
|
||||
assert_has_file expected-fail
|
||||
echo "ok subdir enoent"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
$OSTREE checkout test2 --allow-noent --subpath /enoent 2>/dev/null
|
||||
echo "ok subdir noent"
|
||||
|
||||
Reference in new issue
Block a user