blob: b6ee2270b2653cdf627f8599e5ef69378b021cea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/bin/sh
set -e
TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture "i386"
if [ ! -x ${BUILDDIRECTORY}/apt ]; then
msgmsg "No ${BUILDDIRECTORY}/apt"
msgskip
exit 0
fi
insertpackage 'unstable' 'foo' 'all' '2.0' 'Depends: foo-new-dependency'
insertpackage 'unstable' 'foo-new-dependency' 'all' '2.0'
insertinstalledpackage 'foo' 'all' '1.0'
setupaptarchive
APTARCHIVE=$(readlink -f ./aptarchive)
# default is to allow new dependencies
testequal "The following NEW packages will be installed:
foo-new-dependency
The following packages will be upgraded:
foo
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst foo-new-dependency (2.0 unstable [all])
Inst foo [1.0] (2.0 unstable [all])
Conf foo-new-dependency (2.0 unstable [all])
Conf foo (2.0 unstable [all])" apt upgrade -qq -s
# ensure
testequal "The following packages have been kept back:
foo
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded." apt upgrade -qq -s --no-new-pkgs
|