]>
git.saurik.com Git - apt.git/blob - test/integration/test-bug-543966-downgrade-below-1000-pin
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
8 configarchitecture 'i386'
10 insertpackage 'unstable' 'base-files' 'all' '5.0.0'
11 insertinstalledpackage 'base-files' 'all' '5.0.0-1'
15 STATUS=$(readlink -f rootdir/var/lib/dpkg/status)
16 APTARCHIVE="$(readlink -f aptarchive)"
18 testsuccessequal "base
-files:
25 500 file:${APTARCHIVE} unstable
/main all Packages
" aptcache policy base-files -o apt::pin=0
29 Pin
: release a
=unstable
30 Pin
-Priority: $2" > rootdir/etc/apt/preferences
38 if [ "$1" != '*' ]; then
43 testsuccessequal "base
-files:
49 5.0.0 ${PKGPINPRIO:-99}
50 ${REPPINPRIO:- 99} file:${APTARCHIVE} unstable
/main all Packages
" aptcache policy base-files -o apt::pin=99
53 testsuccessequal "base
-files:
59 5.0.0 ${PKGPINPRIO:-100}
60 ${REPPINPRIO:- 100} file:${APTARCHIVE} unstable
/main all Packages
" aptcache policy base-files -o apt::pin=100
63 testsuccessequal "base
-files:
69 5.0.0 ${PKGPINPRIO:-999}
70 ${REPPINPRIO:- 999} file:${APTARCHIVE} unstable
/main all Packages
" aptcache policy base-files -o apt::pin=999
73 testsuccessequal "base
-files:
79 5.0.0 ${PKGPINPRIO:-1000}
80 ${REPPINPRIO:-1000} file:${APTARCHIVE} unstable
/main all Packages
" aptcache policy base-files -o apt::pin=1000
83 msgmsg 'Tests with generic-form pin'
85 msgmsg 'Tests with specific-form pin'
86 testpinning 'base-files'
87 msgmsg 'Tests with specific-form pin with glob'
88 testpinning 'base-fil*'
89 msgmsg 'Tests with specific-form pin with regex'
90 testpinning '/^base-f[iI]les$/'