File: apt-integration

package info (click to toggle)
auto-apt-proxy 17
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 192 kB
  • sloc: sh: 428; makefile: 11
file content (30 lines) | stat: -rwxr-xr-x 657 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

set -eu

cd ${AUTOPKGTEST_TMP:-/tmp}
unset no_proxy

export AUTO_APT_PROXY_NO_CACHE=1
echo "#1 download package"
apt-get source auto-apt-proxy

log=/var/log/apt-cacher-ng/apt-cacher.log

echo "#2 check that the package was downloaded via the proxy"
tries=0
while [ $tries -lt 10 ]; do
  if grep auto-apt-proxy $log; then
    echo "#2 OK"
    exit
  fi
  sleep 1
  tries=$((tries+1))
done

echo "#2 Failure: could not find source download in $log!"
echo "[$log contents]:"
echo "----------------8<----------------8<----------------8<-----------------"
cat $log
echo "----------------8<----------------8<----------------8<-----------------"
exit 1