]> git.saurik.com Git - apt.git/blob - test/integration/test-apt-ftparchive-notautomatic
correct cross & disappear progress detection
[apt.git] / test / integration / test-apt-ftparchive-notautomatic
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7 configarchitecture 'i386'
8
9 getnotautomaticfromsuite() {
10 case "$1" in
11 experimental|backports) echo 'yes';;
12 esac
13 }
14 getbutautomaticupgradesfromsuite() {
15 case "$1" in
16 backports) echo 'yes';;
17 esac
18 }
19
20 insertpackage 'unstable' 'foo' 'i386' '1'
21 insertpackage 'backports' 'foo' 'i386' '3~bpo1'
22 insertpackage 'experimental' 'foo' 'i386' '3'
23 setupaptarchive
24
25 # check no unstable NotAutomatic field
26 testfailure grep "NotAutomatic:" aptarchive/dists/unstable/*Release
27 # check backports NotAutomatic field
28 testsuccess grep "NotAutomatic: yes" aptarchive/dists/backports/*Release
29 # check experimental NotAutomatic field
30 testsuccess grep "NotAutomatic: yes" aptarchive/dists/experimental/*Release
31
32 # check no unstable ButAutomaticUpgrades field
33 testfailure grep "ButAutomaticUpgrades:" aptarchive/dists/unstable/*Release
34 # check backports ButAutomaticUpgrades field
35 testsuccess grep "ButAutomaticUpgrades: yes" aptarchive/dists/backports/*Release
36 # check no experimental ButAutomaticUpgrades field
37 testfailure grep "ButAutomaticUpgrades:" aptarchive/dists/experimental/*Release
38
39 testsuccessequal 'Reading package lists...
40 Building dependency tree...
41 The following NEW packages will be installed:
42 foo
43 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
44 Inst foo (1 unstable [i386])
45 Conf foo (1 unstable [i386])' apt install foo -s
46
47 insertinstalledpackage 'foo' 'i386' '2'
48 testsuccessequal 'Reading package lists...
49 Building dependency tree...
50 The following packages will be upgraded:
51 foo
52 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
53 Inst foo [2] (3~bpo1 backports [i386])
54 Conf foo (3~bpo1 backports [i386])' apt install foo -s