xbps-install(1): do not exit if pkg is up-to-date in dry-run mode.

Close #145
This commit is contained in:
Juan RP
2016-02-05 11:27:40 +01:00
parent 0fa676f50c
commit b759ca4b07
3 changed files with 36 additions and 1 deletions

View File

@@ -32,6 +32,34 @@ install_existent_body() {
atf_check_equal $? 0
}
atf_test_case update_existent
updated_existent_head() {
atf_set "descr" "xbps-install(8): update existent pkg"
}
update_existent_body() {
mkdir -p some_repo pkg_A pkg_B
touch pkg_A/file00
touch pkg_B/file00
cd some_repo
xbps-create -A noarch -n A-1.0_1 -s "A pkg" ../pkg_A
atf_check_equal $? 0
xbps-rindex -d -a $PWD/*.xbps
atf_check_equal $? 0
xbps-create -A noarch -n B-1.1_1 -s "B pkg" ../pkg_B
atf_check_equal $? 0
xbps-rindex -d -a $PWD/*.xbps
atf_check_equal $? 0
cd ..
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -y A
atf_check_equal $? 0
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -un A B
atf_check_equal $? 0
}
atf_init_test_cases() {
atf_add_test_case install_existent
atf_add_test_case update_existent
}