]>
Commit | Line | Data |
---|---|---|
9c3e15ab MV |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
5465192b | 8 | configarchitecture 'amd64' 'i386' |
9c3e15ab MV |
9 | |
10 | # regression test for #754904 | |
25b86db1 | 11 | testfailureequal 'E: Unable to locate package /dev/null' aptget install -qq /dev/null |
9c3e15ab | 12 | |
5465192b DK |
13 | # only consider .deb files |
14 | cat > foo.rpm <<EOF | |
9c3e15ab MV |
15 | I'm not a deb, I'm a teapot. |
16 | EOF | |
5465192b DK |
17 | testfailureequal "E: Unable to locate package ./foo.rpm |
18 | E: Couldn't find any package by glob './foo.rpm' | |
19 | E: Couldn't find any package by regex './foo.rpm'" aptget install -qq ./foo.rpm | |
20 | ||
21 | # and ensure we fail for invalid debs | |
22 | mv foo.rpm foo.deb | |
d61960d9 DK |
23 | testfailure aptget install ./foo.deb |
24 | testsuccess grep '^E: Sub-process Popen returned an error code' rootdir/tmp/testfailure.output | |
c9443c01 DK |
25 | testequal "E: Encountered a section with no Package: header |
26 | E: Problem with MergeList ${TMPWORKINGDIRECTORY}/foo.deb | |
27 | E: The package lists or status file could not be parsed or opened." tail -n 3 rootdir/tmp/testfailure.output | |
9c3e15ab MV |
28 | |
29 | # fakeroot is currently not found, framwork needs updating | |
5465192b DK |
30 | buildsimplenativepackage 'foo' 'i386,amd64' '1.0' |
31 | ||
32 | testfailureequal "Reading package lists... | |
33 | Building dependency tree... | |
34 | Note, selecting 'foo:i386' instead of './incoming/foo_1.0_i386.deb' | |
35 | Note, selecting 'foo' instead of './incoming/foo_1.0_amd64.deb' | |
36 | Some packages could not be installed. This may mean that you have | |
37 | requested an impossible situation or if you are using the unstable | |
38 | distribution that some required packages have not yet been created | |
39 | or been moved out of Incoming. | |
40 | The following information may help to resolve the situation: | |
41 | ||
42 | The following packages have unmet dependencies: | |
43 | foo:i386 : Conflicts: foo but 1.0 is to be installed | |
44 | foo : Conflicts: foo:i386 but 1.0 is to be installed | |
45 | E: Unable to correct problems, you have held broken packages." aptget install ./incoming/foo_1.0_i386.deb ./incoming/foo_1.0_amd64.deb -s -q=0 | |
46 | ||
d61960d9 | 47 | testdpkgnotinstalled 'foo' |
c9443c01 | 48 | testsuccess aptget install ./incoming/foo_1.0_i386.deb -o Debug::pkgCacheGen=1 |
d61960d9 | 49 | testdpkginstalled 'foo' |
5465192b DK |
50 | |
51 | testsuccessequal "Reading package lists... | |
52 | Building dependency tree... | |
53 | Reading state information... | |
54 | Note, selecting 'foo' instead of './incoming/foo_1.0_amd64.deb' | |
55 | The following packages will be REMOVED: | |
56 | foo:i386 | |
57 | The following NEW packages will be installed: | |
58 | foo | |
59 | 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. | |
60 | Remv foo:i386 [1.0] | |
c9443c01 DK |
61 | Inst foo (1.0 local-deb [amd64]) |
62 | Conf foo (1.0 local-deb [amd64])" aptget install ./incoming/foo_1.0_amd64.deb -s -q=0 |