summaryrefslogtreecommitdiffstats
path: root/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard
blob: 82e1d61e80b4e7351fb00857f18b77dea633026f (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
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
set -e

TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"

setupenvironment
configarchitecture 'i386'

# Regression test for LP: #1304403
#
# The issue here is that libkadm5srv-mit8 (priority standard) is replaced
# by a new libkadm5srv-mit9 and libkbd5-7 breaks on the old -mit8 package.
# The -mit8 package is no longer downloadable (and hence not upgradeable)

# normal upradable pkg
#  (libkdb5-7 that breaks on libkadm5srv-mit8 (<< 1.11+dfsg~)
insertinstalledpackage 'upgradable' 'all' '1.0' '' 'extra'
insertpackage 'unstable' 'upgradable' 'all' '2.0' 'Breaks: not-downloadable (<< 1.1)' 'optional'

# no longer downloadable pkg (libkadm5srv-mit8, replaced by libkadm5srv-mit9)
# but priority standard pushes it higher
insertinstalledpackage 'not-downloadable' 'all' '1.0' '' 'standard'

setupaptarchive

# discourage keeping obsolete high-priority packages …
testsuccessequal 'Reading package lists...
Building dependency tree...
Calculating upgrade...
The following packages will be REMOVED:
  not-downloadable
The following packages will be upgraded:
  upgradable
1 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Remv not-downloadable [1.0]
Inst upgradable [1.0] (2.0 unstable [all])
Conf upgradable (2.0 unstable [all])' aptget -s dist-upgrade

# … but if it has dependencies we want to keep it as usual
for i in $(seq 1 10); do
insertinstalledpackage "depender$i" 'all' '1.0' 'Depends: not-downloadable'
done

testsuccessequal 'Reading package lists...
Building dependency tree...
Calculating upgrade...
The following packages have been kept back:
  upgradable
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.' aptget -s dist-upgrade