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