| |
test -f ${TMPDIR}/target/${TMPDIR}/a.pkgnew || atf_fail "file overwritten when it should not have"
|
| |
}
|
| |
|
| + |
config_filenotexist_body()
|
| + |
{
|
| + |
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
|
| + |
echo "${TMPDIR}/a" > plist
|
| + |
|
| + |
echo "entry" > a
|
| + |
|
| + |
atf_check \
|
| + |
pkg create -M test.ucl -p plist
|
| + |
|
| + |
mkdir ${TMPDIR}/target
|
| + |
unset PKG_DBDIR
|
| + |
atf_check \
|
| + |
pkg -o REPOS_DIR=/dev/null -r ${TMPDIR}/target install -qy ${TMPDIR}/test-1.txz
|
| + |
test -f ${TMPDIR}/target/${TMPDIR}/a || atf_fail "file absent"
|
| + |
echo "addition" >> ${TMPDIR}/target/${TMPDIR}/a
|
| + |
atf_check \
|
| + |
-o inline:"entry\naddition\n" \
|
| + |
cat ${TMPDIR}/target/${TMPDIR}/a
|
| + |
|
| + |
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "2"
|
| + |
echo "entry 2" > a
|
| + |
echo "@config ${TMPDIR}/a" > plist
|
| + |
|
| + |
atf_check \
|
| + |
pkg create -M test.ucl -p plist
|
| + |
|
| + |
pkg repo .
|
| + |
mkdir reposconf
|
| + |
echo "local: { url: file://${TMPDIR} }" > reposconf/local.conf
|
| + |
rm ${TMPDIR}/target/${TMPDIR}/a
|
| + |
atf_check \
|
| + |
pkg -o REPOS_DIR=${TMPDIR}/reposconf -r ${TMPDIR}/target upgrade -qy test
|
| + |
|
| + |
test ! -f ${TMPDIR}/target/${TMPDIR}/a.pkgnew || atf_fail "redundant pkgnew left hanging"
|
| + |
test -f ${TMPDIR}/target/${TMPDIR}/a || atf_fail "config file not installed"
|
| + |
}
|
| + |
|
| |
config_hardlink_body()
|
| |
{
|
| |
# Create a pkg
|