]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-543966-downgrade-below-1000-pin
ensure the right permissions as dpkg-deb ensists
[apt.git] / test / integration / test-bug-543966-downgrade-below-1000-pin
CommitLineData
16808002
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture 'i386'
9
10insertpackage 'unstable' 'base-files' 'all' '5.0.0'
11insertinstalledpackage 'base-files' 'all' '5.0.0-1'
12
13setupaptarchive
14
15STATUS=$(readlink -f rootdir/var/lib/dpkg/status)
16APTARCHIVE="$(readlink -f aptarchive)/"
17
18testequal "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
27echo 'Package: base-files
28Pin: release a=unstable
29Pin-Priority: 99' > rootdir/etc/apt/preferences
30
31testequal "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
41echo 'Package: base-files
42Pin: release a=unstable
43Pin-Priority: 100' > rootdir/etc/apt/preferences
44
45testequal "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
55echo 'Package: base-files
56Pin: release a=unstable
57Pin-Priority: 999' > rootdir/etc/apt/preferences
58
59testequal "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
69echo 'Package: base-files
70Pin: release a=unstable
71Pin-Priority: 1000' > rootdir/etc/apt/preferences
72
73testequal "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