]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-progress-fd
don't ask server if we have entire file in partial/
[apt.git] / test / integration / test-apt-progress-fd
CommitLineData
42c1513b
MV
1#!/bin/sh
2set -e
3
3abb6a6a
DK
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
42c1513b
MV
6
7setupenvironment
8configarchitecture 'amd64' 'i386'
9
10buildsimplenativepackage 'testing' 'amd64' '0.1' 'stable'
11buildsimplenativepackage 'testing' 'amd64' '0.8.15' 'stable'
12buildsimplenativepackage 'testing2' 'amd64,i386' '0.8.15' 'stable'
13setupaptarchive
14
15# install native
16exec 3> apt-progress.log
17testsuccess aptget install testing=0.1 -y -o APT::Status-Fd=3
25b86db1 18testfileequal './apt-progress.log' 'dlstatus:1:0:Retrieving file 1 of 1
fb193b1c 19dlstatus:1:100:Retrieving file 1 of 1
42c1513b 20pmstatus:dpkg-exec:0:Running dpkg
dd640f3c 21pmstatus:testing:0:Installing testing (amd64)
ecb777dd
DK
22pmstatus:testing:16.6667:Preparing testing (amd64)
23pmstatus:testing:33.3333:Unpacking testing (amd64)
24pmstatus:testing:50:Preparing to configure testing (amd64)
25pmstatus:dpkg-exec:50:Running dpkg
26pmstatus:testing:50:Configuring testing (amd64)
27pmstatus:testing:66.6667:Configuring testing (amd64)
28pmstatus:testing:83.3333:Installed testing (amd64)
25b86db1 29pmstatus:dpkg-exec:83.3333:Running dpkg'
42c1513b
MV
30
31# upgrade
32exec 3> apt-progress.log
33testsuccess aptget install testing=0.8.15 -y -o APT::Status-Fd=3
25b86db1 34testfileequal './apt-progress.log' 'dlstatus:1:0:Retrieving file 1 of 1
fb193b1c 35dlstatus:1:100:Retrieving file 1 of 1
42c1513b 36pmstatus:dpkg-exec:0:Running dpkg
4c559e97 37pmstatus:testing:0:Installing testing (amd64)
ecb777dd
DK
38pmstatus:testing:16.6667:Preparing testing (amd64)
39pmstatus:testing:33.3333:Unpacking testing (amd64)
40pmstatus:testing:50:Preparing to configure testing (amd64)
41pmstatus:dpkg-exec:50:Running dpkg
42pmstatus:testing:50:Configuring testing (amd64)
43pmstatus:testing:66.6667:Configuring testing (amd64)
44pmstatus:testing:83.3333:Installed testing (amd64)
25b86db1 45pmstatus:dpkg-exec:83.3333:Running dpkg'
4c559e97
DK
46
47# reinstall
48exec 3> apt-progress.log
49testsuccess aptget install testing=0.8.15 --reinstall -y -o APT::Status-Fd=3
25b86db1 50testfileequal './apt-progress.log' 'dlstatus:1:0:Retrieving file 1 of 1
fb193b1c 51dlstatus:1:100:Retrieving file 1 of 1
4c559e97
DK
52pmstatus:dpkg-exec:0:Running dpkg
53pmstatus:testing:0:Installing testing (amd64)
ecb777dd
DK
54pmstatus:testing:16.6667:Preparing testing (amd64)
55pmstatus:testing:33.3333:Unpacking testing (amd64)
56pmstatus:testing:50:Preparing to configure testing (amd64)
57pmstatus:dpkg-exec:50:Running dpkg
58pmstatus:testing:50:Configuring testing (amd64)
59pmstatus:testing:66.6667:Configuring testing (amd64)
60pmstatus:testing:83.3333:Installed testing (amd64)
25b86db1 61pmstatus:dpkg-exec:83.3333:Running dpkg'
42c1513b
MV
62
63# and remove
64exec 3> apt-progress.log
65testsuccess aptget remove testing -y -o APT::Status-Fd=3
25b86db1 66testfileequal './apt-progress.log' 'pmstatus:dpkg-exec:0:Running dpkg
dd640f3c 67pmstatus:testing:0:Removing testing (amd64)
ecb777dd
DK
68pmstatus:testing:25:Preparing for removal of testing (amd64)
69pmstatus:testing:50:Removing testing (amd64)
70pmstatus:testing:75:Removed testing (amd64)
25b86db1 71pmstatus:dpkg-exec:75:Running dpkg'
42c1513b 72
42c1513b
MV
73# install non-native and ensure we get proper progress info
74exec 3> apt-progress.log
75testsuccess aptget install testing2:i386 -y -o APT::Status-Fd=3
25b86db1 76testfileequal './apt-progress.log' 'dlstatus:1:0:Retrieving file 1 of 1
fb193b1c 77dlstatus:1:100:Retrieving file 1 of 1
42c1513b 78pmstatus:dpkg-exec:0:Running dpkg
dd640f3c 79pmstatus:testing2:0:Installing testing2 (i386)
ecb777dd
DK
80pmstatus:testing2:16.6667:Preparing testing2 (i386)
81pmstatus:testing2:33.3333:Unpacking testing2 (i386)
82pmstatus:testing2:50:Preparing to configure testing2 (i386)
83pmstatus:dpkg-exec:50:Running dpkg
84pmstatus:testing2:50:Configuring testing2 (i386)
85pmstatus:testing2:66.6667:Configuring testing2 (i386)
86pmstatus:testing2:83.3333:Installed testing2 (i386)
25b86db1 87pmstatus:dpkg-exec:83.3333:Running dpkg'
42c1513b 88
dd640f3c 89rm -f apt-progress*.log