core: Take --repo as the first argument
I kept doing this over and over...it feels more natural. The "prefix" thing was (almost) unused anyways, and it was easy enough to replace.
This commit is contained in:
1 parent
3b61a21c0f
commit
d6b3fb5118
21 files changed
+73
-131
No files matched your search
+12
-10
@@ -80,16 +80,16 @@ setup_test_repository () {
|
||||
mkdir repo
|
||||
cd repo
|
||||
ot_repo="--repo=`pwd`"
|
||||
export OSTREE="ostree ${ot_repo}"
|
||||
cd ../files
|
||||
export ot_repo
|
||||
if test "$mode" = "archive"; then
|
||||
ostree init --archive $ot_repo
|
||||
$OSTREE init --archive
|
||||
else
|
||||
ostree init $ot_repo
|
||||
$OSTREE init
|
||||
fi
|
||||
ostree commit $ot_repo -b test2 -s "Test Commit 1" -m "Commit body first" --add=firstfile --add=somelink
|
||||
ostree commit $ot_repo -b test2 -s "Test Commit 2" -m "Commit body second" --add=baz/cow --add=baz/saucer --add=baz/deeper/ohyeah --add=baz/another/y --add=baz/alink
|
||||
ostree fsck -q $ot_repo
|
||||
$OSTREE commit -b test2 -s "Test Commit 1" -m "Commit body first" --add=firstfile --add=somelink
|
||||
$OSTREE commit -b test2 -s "Test Commit 2" -m "Commit body second" --add=baz/cow --add=baz/saucer --add=baz/deeper/ohyeah --add=baz/another/y --add=baz/alink
|
||||
$OSTREE fsck -q
|
||||
|
||||
cd $oldpwd
|
||||
}
|
||||
@@ -99,20 +99,20 @@ setup_fake_remote_repo1() {
|
||||
mkdir ostree-srv
|
||||
cd ostree-srv
|
||||
mkdir gnomerepo
|
||||
ostree init --archive --repo=gnomerepo
|
||||
ostree --repo=gnomerepo init --archive
|
||||
mkdir gnomerepo-files
|
||||
cd gnomerepo-files
|
||||
echo first > firstfile
|
||||
mkdir baz
|
||||
echo moo > baz/cow
|
||||
echo alien > baz/saucer
|
||||
find | grep -v '^\.$' | ostree commit --repo=${test_tmpdir}/ostree-srv/gnomerepo -b main -s "A remote commit" -m "Some Commit body" --from-stdin
|
||||
find | grep -v '^\.$' | ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo commit -b main -s "A remote commit" -m "Some Commit body" --from-stdin
|
||||
mkdir baz/deeper
|
||||
ostree commit --repo=${test_tmpdir}/ostree-srv/gnomerepo -b main -s "Add deeper" --add=baz/deeper
|
||||
ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo commit -b main -s "Add deeper" --add=baz/deeper
|
||||
echo hi > baz/deeper/ohyeah
|
||||
mkdir baz/another/
|
||||
echo x > baz/another/y
|
||||
find | grep -v '^\.$' | ostree commit --repo=${test_tmpdir}/ostree-srv/gnomerepo -b main -s "The rest" --from-stdin
|
||||
find | grep -v '^\.$' | ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo commit -b main -s "The rest" --from-stdin
|
||||
cd ..
|
||||
rm -rf gnomerepo-files
|
||||
|
||||
@@ -150,6 +150,8 @@ EOF
|
||||
exit 1
|
||||
fi
|
||||
cd ${oldpwd}
|
||||
|
||||
export OSTREE="ostree --repo=repo"
|
||||
}
|
||||
|
||||
trap 'die' EXIT
|
||||
@@ -32,12 +32,12 @@ assert_streq "$(readlink ${test_tmpdir}/repo/objects/cf/443bea5eb400bc25b376c079
|
||||
|
||||
echo "ok check"
|
||||
|
||||
ostree checkout $ot_repo test2 checkout-test2
|
||||
$OSTREE checkout test2 checkout-test2
|
||||
echo "ok checkout"
|
||||
|
||||
ostree rev-parse $ot_repo test2
|
||||
ostree rev-parse $ot_repo 'test2^'
|
||||
ostree rev-parse $ot_repo 'test2^^' 2>/dev/null && (echo 1>&2 "rev-parse test2^^ unexpectedly succeeded!"; exit 1)
|
||||
$OSTREE rev-parse test2
|
||||
$OSTREE rev-parse 'test2^'
|
||||
$OSTREE rev-parse 'test2^^' 2>/dev/null && (echo 1>&2 "rev-parse test2^^ unexpectedly succeeded!"; exit 1)
|
||||
echo "ok rev-parse"
|
||||
|
||||
cd checkout-test2
|
||||
@@ -47,10 +47,10 @@ assert_file_has_content baz/cow moo
|
||||
assert_has_file baz/deeper/ohyeah
|
||||
echo "ok content"
|
||||
|
||||
ostree commit $ot_repo -b test2 -s delete -r firstfile
|
||||
$OSTREE commit -b test2 -s delete -r firstfile
|
||||
assert_has_file firstfile # It should still exist in this checkout
|
||||
cd $test_tmpdir
|
||||
ostree checkout $ot_repo test2 $test_tmpdir/checkout-test2-2
|
||||
$OSTREE checkout test2 $test_tmpdir/checkout-test2-2
|
||||
cd $test_tmpdir/checkout-test2-2
|
||||
assert_not_has_file firstfile
|
||||
assert_has_file baz/saucer
|
||||
@@ -68,11 +68,11 @@ mkdir -p another/nested/tree
|
||||
echo anotherone > another/nested/tree/1
|
||||
echo whee2 > another/whee
|
||||
# FIXME - remove grep for .
|
||||
find | grep -v '^\.$' | ostree commit $ot_repo -b test2 -s "From find" --from-stdin
|
||||
find | grep -v '^\.$' | $OSTREE commit -b test2 -s "From find" --from-stdin
|
||||
echo "ok stdin commit"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
ostree checkout $ot_repo test2 $test_tmpdir/checkout-test2-3
|
||||
$OSTREE checkout test2 $test_tmpdir/checkout-test2-3
|
||||
cd checkout-test2-3
|
||||
assert_has_file a/nested/2
|
||||
assert_file_has_content a/nested/2 'two2'
|
||||
|
||||
@@ -27,7 +27,7 @@ echo '1..3'
|
||||
setup_test_repository "archive"
|
||||
echo "ok setup"
|
||||
|
||||
ostree checkout $ot_repo test2 checkout-test2
|
||||
$OSTREE checkout test2 checkout-test2
|
||||
echo "ok checkout"
|
||||
|
||||
cd checkout-test2
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ set -e
|
||||
echo "1..1"
|
||||
|
||||
setup_test_repository "regular"
|
||||
ostree log $ot_repo test2 > $test_tmpdir/log.txt
|
||||
$OSTREE log test2 > $test_tmpdir/log.txt
|
||||
assert_file_has_content $test_tmpdir/log.txt "Test Commit 1"
|
||||
assert_file_has_content $test_tmpdir/log.txt "Test Commit 2"
|
||||
echo "ok log"
|
||||
@@ -25,7 +25,7 @@ set -e
|
||||
echo '1..2'
|
||||
|
||||
setup_test_repository "regular"
|
||||
ostree remote add $ot_repo origin http://example.com/ostree/gnome
|
||||
$OSTREE remote add origin http://example.com/ostree/gnome
|
||||
echo "ok remote add"
|
||||
assert_file_has_content $test_tmpdir/repo/config "example.com"
|
||||
echo "ok config"
|
||||
+3
-3
@@ -27,7 +27,7 @@ echo '1..1'
|
||||
setup_fake_remote_repo1
|
||||
cd ${test_tmpdir}
|
||||
mkdir repo
|
||||
ostree init --repo=repo
|
||||
ostree remote --repo=repo add origin $(cat httpd-address)/ostree/gnomerepo
|
||||
ostree pull --repo=repo origin main
|
||||
$OSTREE init
|
||||
$OSTREE remote add origin $(cat httpd-address)/ostree/gnomerepo
|
||||
$OSTREE pull origin main
|
||||
echo "ok pull"
|
||||
@@ -26,7 +26,7 @@ echo "1..3"
|
||||
|
||||
setup_test_repository "regular"
|
||||
|
||||
ostree checkout $ot_repo test2 checkout-test2
|
||||
$OSTREE checkout test2 checkout-test2
|
||||
|
||||
cd "${test_tmpdir}"
|
||||
mkdir artifact-libfoo-runtime
|
||||
@@ -36,7 +36,7 @@ echo 'an ELF file' > usr/lib/libfoo.so
|
||||
mkdir -p usr/share
|
||||
echo 'some data' > usr/share/foo.data
|
||||
|
||||
find | grep -v '^\.$' | ostree commit $ot_repo -b artifact-libfoo-runtime -s 'Build 12345 of libfoo' --from-stdin
|
||||
find | grep -v '^\.$' | $OSTREE commit -b artifact-libfoo-runtime -s 'Build 12345 of libfoo' --from-stdin
|
||||
|
||||
cd "${test_tmpdir}"
|
||||
mkdir artifact-libfoo-devel
|
||||
@@ -46,7 +46,7 @@ echo 'a header' > usr/include/foo.h
|
||||
mkdir -p usr/share/doc
|
||||
echo 'some documentation' > usr/share/doc/foo.txt
|
||||
|
||||
find | grep -v '^\.$' | ostree commit $ot_repo -b artifact-libfoo-devel -s 'Build 12345 of libfoo' --from-stdin
|
||||
find | grep -v '^\.$' | $OSTREE commit -b artifact-libfoo-devel -s 'Build 12345 of libfoo' --from-stdin
|
||||
|
||||
cd "${test_tmpdir}"
|
||||
mkdir artifact-barapp
|
||||
@@ -54,12 +54,12 @@ cd artifact-barapp
|
||||
mkdir -p usr/bin
|
||||
echo 'another ELF file' > usr/bin/bar
|
||||
|
||||
find | grep -v '^\.$' | ostree commit $ot_repo -b artifact-barapp -s 'Build 42 of barapp' --from-stdin
|
||||
find | grep -v '^\.$' | $OSTREE commit -b artifact-barapp -s 'Build 42 of barapp' --from-stdin
|
||||
|
||||
echo 'ok artifacts committed'
|
||||
|
||||
cd "${test_tmpdir}"
|
||||
ostree compose $ot_repo some-compose artifact-libfoo-runtime artifact-libfoo-devel artifact-barapp
|
||||
$OSTREE compose some-compose artifact-libfoo-runtime artifact-libfoo-devel artifact-barapp
|
||||
echo 'ok compose command'
|
||||
|
||||
cd some-compose
|
||||
|
||||
Reference in new issue
Block a user