xbps-install(1): implement #109.

-n/--dry-run mode now prints "installed_size" obj as 5th argument,
and "filename-size" as 6th argument (if available).

Close #109
This commit is contained in:
Juan RP
2015-10-19 19:02:26 +02:00
parent 99bf58b091
commit 24af8cde9b
4 changed files with 22 additions and 4 deletions

View File

@@ -439,7 +439,9 @@ update_xbps_body() {
xbps-rindex -d -a repo/*.xbps
atf_check_equal $? 0
out=$(xbps-install -r root --repository=repo -yun)
atf_check_equal "$out" "xbps-1.1_1 update noarch $(readlink -f repo)"
set -- $out
exp="$1 $2 $3 $4"
atf_check_equal "$exp" "xbps-1.1_1 update noarch $(readlink -f repo)"
}
atf_test_case update_xbps_virtual
@@ -476,7 +478,9 @@ update_xbps_virtual_body() {
xbps-rindex -d -a repo/*.xbps
atf_check_equal $? 0
out=$(xbps-install -r root --repository=repo -yun)
atf_check_equal "$out" "xbps-git-1.1_1 update noarch $(readlink -f repo)"
set -- $out
exp="$1 $2 $3 $4"
atf_check_equal "$exp" "xbps-git-1.1_1 update noarch $(readlink -f repo)"
}
atf_init_test_cases() {

View File

@@ -27,7 +27,9 @@ update_hold_body() {
atf_check_equal $? 0
cd ..
out=$(xbps-install -r root --repository=$PWD/repo -un)
atf_check_equal "$out" "A-1.1_1 hold noarch $PWD/repo"
set -- $out
exp="$1 $2 $3 $4"
atf_check_equal "$exp" "A-1.1_1 hold noarch $PWD/repo"
xbps-install -r root --repository=$PWD/repo -yuvd
atf_check_equal $? 0
out=$(xbps-query -r root -p pkgver A)