libxbps: add pkgs on hold mode to the transaction, but ignore them.
Those are there mostly to be shown by the clients and notify that there's an update in repos that is being ignored. Idea by @chneukirchen.
This commit is contained in:
@@ -17,3 +17,4 @@ atf_test_program{name="vpkg_test"}
|
||||
atf_test_program{name="install_test"}
|
||||
atf_test_program{name="preserve_files_test"}
|
||||
atf_test_program{name="update_shlibs"}
|
||||
atf_test_program{name="update_hold"}
|
||||
|
||||
@@ -6,7 +6,7 @@ TESTSHELL = conf_files_test issue6_test issue18_test issue20_test remove_test
|
||||
TESTSHELL+= replace_test installmode_test obsoletefiles_test
|
||||
TESTSHELL+= issue31_test scripts_test incorrect_deps_test
|
||||
TESTSHELL+= vpkg_test install_test preserve_files_test
|
||||
TESTSHELL+= update_shlibs
|
||||
TESTSHELL+= update_shlibs update_hold
|
||||
EXTRA_FILES = Kyuafile
|
||||
|
||||
include $(TOPDIR)/mk/test.mk
|
||||
|
||||
40
tests/xbps/libxbps/shell/update_hold.sh
Normal file
40
tests/xbps/libxbps/shell/update_hold.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env atf-sh
|
||||
|
||||
atf_test_case update_hold
|
||||
|
||||
update_hold_head() {
|
||||
atf_set "descr" "Tests for pkg update: pkg is on hold mode"
|
||||
}
|
||||
|
||||
update_hold_body() {
|
||||
mkdir -p repo pkg_A
|
||||
cd 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
|
||||
cd ..
|
||||
xbps-install -r root --repository=$PWD/repo -yd A
|
||||
atf_check_equal $? 0
|
||||
xbps-pkgdb -r root -m hold A
|
||||
atf_check_equal $? 0
|
||||
out=$(xbps-query -r root -H)
|
||||
atf_check_equal $out A-1.0_1
|
||||
cd repo
|
||||
xbps-create -A noarch -n A-1.1_1 -s "A pkg" ../pkg_A
|
||||
atf_check_equal $? 0
|
||||
xbps-rindex -d -a $PWD/*.xbps
|
||||
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"
|
||||
xbps-install -r root --repository=$PWD/repo -yuvd
|
||||
atf_check_equal $? 0
|
||||
out=$(xbps-query -r root -p pkgver A)
|
||||
atf_check_equal $out A-1.0_1
|
||||
|
||||
}
|
||||
|
||||
atf_init_test_cases() {
|
||||
atf_add_test_case update_hold
|
||||
}
|
||||
Reference in New Issue
Block a user