]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-543966-downgrade-below-1000-pin
support DEB_BUILD_PROFILES and -P for build profiles
[apt.git] / test / integration / test-bug-543966-downgrade-below-1000-pin
1 #!/bin/sh
2 set -e
3
4 TESTDIR=$(readlink -f $(dirname $0))
5 . $TESTDIR/framework
6
7 setupenvironment
8 configarchitecture 'i386'
9
10 insertpackage 'unstable' 'base-files' 'all' '5.0.0'
11 insertinstalledpackage 'base-files' 'all' '5.0.0-1'
12
13 setupaptarchive
14
15 STATUS=$(readlink -f rootdir/var/lib/dpkg/status)
16 APTARCHIVE="$(readlink -f aptarchive)/"
17
18 testequal "base-files:
19 Installed: 5.0.0-1
20 Candidate: 5.0.0-1
21 Version table:
22 *** 5.0.0-1 0
23 100 $STATUS
24 5.0.0 0
25 500 file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=0
26
27 echo 'Package: base-files
28 Pin: release a=unstable
29 Pin-Priority: 99' > rootdir/etc/apt/preferences
30
31 testequal "base-files:
32 Installed: 5.0.0-1
33 Candidate: 5.0.0-1
34 Package pin: 5.0.0
35 Version table:
36 *** 5.0.0-1 99
37 100 $STATUS
38 5.0.0 99
39 500 file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=99
40
41 echo 'Package: base-files
42 Pin: release a=unstable
43 Pin-Priority: 100' > rootdir/etc/apt/preferences
44
45 testequal "base-files:
46 Installed: 5.0.0-1
47 Candidate: 5.0.0-1
48 Package pin: 5.0.0
49 Version table:
50 *** 5.0.0-1 100
51 100 $STATUS
52 5.0.0 100
53 500 file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=100
54
55 echo 'Package: base-files
56 Pin: release a=unstable
57 Pin-Priority: 999' > rootdir/etc/apt/preferences
58
59 testequal "base-files:
60 Installed: 5.0.0-1
61 Candidate: 5.0.0-1
62 Package pin: 5.0.0
63 Version table:
64 *** 5.0.0-1 999
65 100 $STATUS
66 5.0.0 999
67 500 file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=999
68
69 echo 'Package: base-files
70 Pin: release a=unstable
71 Pin-Priority: 1000' > rootdir/etc/apt/preferences
72
73 testequal "base-files:
74 Installed: 5.0.0-1
75 Candidate: 5.0.0
76 Package pin: 5.0.0
77 Version table:
78 *** 5.0.0-1 1000
79 100 $STATUS
80 5.0.0 1000
81 500 file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=1000