4 TESTDIR
=$(readlink -f $(dirname $0))
8 configarchitecture
"i386"
10 insertpackage
'unstable' 'foo' 'all' '1.0'
12 setupaptarchive
--no-update
14 APTARCHIVE
=$(readlink -f ./aptarchive)
16 # make Packages *only* accessable by-hash for this test
17 mkdir -p aptarchive
/dists
/unstable
/main
/binary
-i386/by
-hash
18 (cd aptarchive
/dists
/unstable
/main
/binary
-i386/by
-hash &&
20 ln -s Packages.gz
$(sha256sum Packages.gz|cut -f1 -d' ') )
23 mkdir -p aptarchive
/dists
/unstable
/main
/source
/by
-hash
24 (cd aptarchive
/dists
/unstable
/main
/source
/by
-hash &&
25 ln -s ..
/Sources.gz
$(sha256sum ../Sources.gz|cut -f1 -d' ')
29 # ensure we do not know about "foo"
30 testequal
"Reading package lists...
31 Building dependency tree...
32 E: Unable to locate package foo" aptget
install -q -s foo
34 # ensure we can apt-get update by hash
35 testsuccess aptget update
-o APT
::Acquire
::By
-Hash=1
37 # ensure it keeps working
38 testequal
"Inst foo (1.0 unstable [all])
39 Conf foo (1.0 unstable [all])" aptget
install -qq -s foo