]>
git.saurik.com Git - apt.git/blob - test/integration/test-apt-acquire-additional-files
150a50980ffaba198802fc161899ad4a36a5ed25
4 TESTDIR
=$(readlink -f $(dirname $0))
8 configarchitecture
'amd64'
9 configcompression
'.' 'gz'
11 buildsimplenativepackage
'foo' 'amd64' '1' 'unstable'
13 setupaptarchive
--no-update
16 testsuccessequal
"Get:1 http://localhost:8080 unstable InRelease [$(stat -c%s aptarchive/dists/unstable/InRelease) B]
17 Get:2 http://localhost:8080 unstable/main Sources [$(stat -c%s aptarchive/dists/unstable/main/source/Sources.gz) B]
18 Get:3 http://localhost:8080 unstable/main amd64 Packages [$(stat -c%s aptarchive/dists/unstable/main/binary-amd64/Packages.gz) B]
19 Get:4 http://localhost:8080 unstable/main Translation-en [$(stat -c%s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B]
20 Reading package lists..." aptget update
22 testempty
find rootdir
/var
/lib
/apt
/lists
-name '*Contents*'
24 cat > rootdir
/etc
/apt
/apt.conf.d
/content
-target.conf
<<EOF
25 APT::Acquire::Targets::deb::Contents {
26 URI "\$(COMPONENT)/Contents-\$(ARCHITECTURE)";
27 ShortDescription "Contents";
28 Description "\$(SITE) \$(RELEASE)/\$(COMPONENT) \$(ARCHITECTURE) Contents";
32 testsuccessequal
"Hit http://localhost:8080 unstable InRelease
33 Get:1 http://localhost:8080 unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B]
34 Reading package lists..." aptget update
36 testequal
'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64' find rootdir
/var
/lib
/apt
/lists
-name '*Contents*'
37 testsuccess
cmp 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64' 'aptarchive/dists/unstable/main/Contents-amd64'
39 # no automatic uncompress based on the name please,
40 # only if we downloaded a compressed file, but target was uncompressed
41 cat > rootdir
/etc
/apt
/apt.conf.d
/content
-target.conf
<<EOF
42 APT::Acquire::Targets::deb::Contents {
43 URI "\$(COMPONENT)/Contents-\$(ARCHITECTURE).gz";
44 ShortDescription "Contents.gz";
45 Description "\$(SITE) \$(RELEASE)/\$(COMPONENT) \$(ARCHITECTURE) Contents.gz";
49 testsuccessequal
"Hit http://localhost:8080 unstable InRelease
50 Get:1 http://localhost:8080 unstable/main amd64 Contents.gz [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B]
51 Reading package lists..." aptget update
53 testequal
'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' find rootdir
/var
/lib
/apt
/lists
-name '*Contents*'
54 testsuccess
cmp 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' 'aptarchive/dists/unstable/main/Contents-amd64.gz'