| 1 | #!/bin/sh |
| 2 | set -e |
| 3 | |
| 4 | TESTDIR=$(readlink -f $(dirname $0)) |
| 5 | . $TESTDIR/framework |
| 6 | setupenvironment |
| 7 | configarchitecture 'native' 'strange-arch' |
| 8 | |
| 9 | insertpackage 'unstable' 'unrelated' 'strange-arch' '1' |
| 10 | |
| 11 | insertinstalledpackage 'apt' 'native' '0.8.9' 'Depends: libc6 (>= 2.3.4)' |
| 12 | insertinstalledpackage 'libc6' 'native' '2.4.1-1' |
| 13 | insertinstalledpackage 'oldcrap' 'all' '1-1' |
| 14 | |
| 15 | insertpackage 'unstable' 'apt' 'native' '0.8.10' 'Depends: libc6 (>= 2.10), libdb4.8 |
| 16 | Breaks: oldcrap' |
| 17 | insertpackage 'unstable' 'libc6' 'native' '2.11.2-7' |
| 18 | insertpackage 'unstable' 'libdb4.8' 'native' '4.8.30-3' |
| 19 | |
| 20 | setupaptarchive |
| 21 | |
| 22 | testequal 'Reading package lists... |
| 23 | Building dependency tree... |
| 24 | The following packages will be REMOVED: |
| 25 | oldcrap |
| 26 | The following NEW packages will be installed: |
| 27 | libdb4.8 |
| 28 | The following packages will be upgraded: |
| 29 | apt libc6 |
| 30 | 2 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. |
| 31 | After this operation, 0 B of additional disk space will be used. |
| 32 | E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only |
| 33 | |
| 34 | testsuccess aptmark hold apt |
| 35 | |
| 36 | testequal 'Reading package lists... |
| 37 | Building dependency tree... |
| 38 | The following packages have been kept back: |
| 39 | apt |
| 40 | The following packages will be upgraded: |
| 41 | libc6 |
| 42 | 1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. |
| 43 | After this operation, 0 B of additional disk space will be used. |
| 44 | E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only -o Test='hold-back-apt' |