~ubuntu-branches/debian/experimental/apt/experimental

« back to all changes in this revision

Viewing changes to test/integration/test-apt-get-download

  • Committer: Package Import Robot
  • Author(s): Michael Vogt, Michael Vogt, David Kalnischkies
  • Date: 2014-11-06 10:01:21 UTC
  • Revision ID: package-import@ubuntu.com-20141106100121-lp2glb39mu335mih
Tags: 1.1~exp8
[ Michael Vogt ]
* merge unstable upload version 1.0.9.3
* Ensure /etc/apt/auth.conf has _apt:root owner
* Use sysconf(_SC_ARG_MAX) to find the size of Dpkg::MaxArgBytes
* Only support Translation-* that are listed in the {In,}Release file
* Call "Dequeue()" for items in AbortTransaction() to fix race
* prepare ABI for feature/socketpair
* Bump ABI to 4.15

[ David Kalnischkies ]
* reenable support for -s (and co) in apt-get source (Closes: 742578)
* run acquire transactions only once
* aborted reverify restores file owner and permission
* test if TMPDIR is accessible before using (Closes: 765951)
* chown finished partial files earlier
* promote filesize to a hashstring

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
testsuccess aptget update
34
34
 
35
 
# all copied files are properly chmodded
36
 
find rootdir/var/lib/apt/lists -type f | while read file; do
37
 
        testaccessrights "$file" '644'
38
 
done
39
 
 
40
35
testdownload() {
41
36
        local APT="$2"
42
37
        if [ -n "$3" ]; then
49
44
}
50
45
 
51
46
# normal case as "root"
 
47
OLDPWD="$(pwd)"
 
48
cd downloaded
52
49
testdownload apt_2.0_all.deb apt
 
50
cd "$OLDPWD"
53
51
 
54
52
# simulate normal user with non-existent root-owned directories
55
53
rm -rf rootdir/var/cache/apt/archives/
57
55
addtrap 'prefix' "chmod -f -R +w $PWD/rootdir/var/cache/apt/archives || true;"
58
56
chmod -R -w rootdir/var/cache/apt/archives
59
57
 
 
58
OLDPWD="$(pwd)"
 
59
cd downloaded
 
60
 
60
61
# normal case(es)
61
62
testdownload apt_1.0_all.deb apt stable
62
63
testdownload apt_2.0_all.deb apt
63
64
 
64
 
DEBFILE="$(readlink -f aptarchive)/pool/apt_2.0_all.deb"
 
65
DEBFILE="$(readlink -f ../aptarchive)/pool/apt_2.0_all.deb"
65
66
testequal "'file://${DEBFILE}' apt_2.0_all.deb $(stat -c%s $DEBFILE) SHA512:$(sha512sum $DEBFILE | cut -d' ' -f 1)" aptget download apt --print-uris
66
67
 
67
68
# deb:677887
 
69
testequal "E: Can't find a source to download version '1.0' of 'vrms:i386'" aptget download vrms --print-uris
68
70
testequal "E: Can't find a source to download version '1.0' of 'vrms:i386'" aptget download vrms
69
71
 
70
72
# deb:736962
79
81
testsuccess test -s apt_2.0_all.deb
80
82
 
81
83
# restore "root" rights
 
84
cd "$OLDPWD"
82
85
chmod -f -R +w $PWD/rootdir/var/cache/apt/archives
83
86
rm -rf rootdir/var/cache/apt/archives/
84
87
 
91
94
testsuccess test -s rootdir/var/cache/apt/archives/apt_2.0_all.deb
92
95
testaccessrights 'aptarchive/pool/apt_2.0_all.deb' '644'
93
96
mv aptarchive/pool/apt_2.0_all.deb aptarchive/pool/apt_2.0_all.deb.gone
 
97
cd downloaded
94
98
testdownload apt_2.0_all.deb apt
 
99
cd "$OLDPWD"
95
100
mv aptarchive/pool/apt_2.0_all.deb.gone aptarchive/pool/apt_2.0_all.deb