4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
"i386"
9 insertpackage
'unstable' 'apt' 'i386' '0.8.15'
10 insertpackage
'unstable' 'arch' 'i386' '1.0'
15 msgtest
"Test that the Candidate for $1 is" $2
16 if [ "$(aptcache policy $1 | grep '^ Candidate:')" = " Candidate: $2" ]; then
25 testcandidate apt
'0.8.15'
26 testequal
'N: Unable to locate package doesntexist' aptcache policy doesntexist
-q=0
27 testequal
'Reading package lists...
28 Building dependency tree...
29 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist
-upgrade
32 Pin: release a=unstable
33 Pin-Priority: -1' > rootdir
/etc
/apt
/preferences
35 testcandidate apt
'(none)'
36 testequal
'N: Unable to locate package doesntexist' aptcache policy doesntexist
-q=0
37 testequal
'Reading package lists...
38 Building dependency tree...
39 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist
-upgrade
43 Pin: release a=unstable
44 Pin-Priority: 1000' >> rootdir
/etc
/apt
/preferences
46 testcandidate apt
'(none)'
50 Pin: release a=unstable
51 Pin-Priority: 1000' >> rootdir
/etc
/apt
/preferences
53 testcandidate apt
'(none)'
54 testequal
'N: Unable to locate package doesntexist' aptcache policy doesntexist
-q=0
56 testequal
'Reading package lists...
57 Building dependency tree...
58 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist
-upgrade
60 echo 'Package: arch:amd64
61 Pin: release a=unstable
62 Pin-Priority: -1' > rootdir
/etc
/apt
/preferences
64 testcandidate arch
'1.0'
68 Pin: release a=unstable
69 Pin-Priority: -1' >> rootdir
/etc
/apt
/preferences
71 testcandidate arch
'(none)'