debget: Don't check if apt-get works properly first
Speeds script up again by up to factor 2, i.e. by up to factor 4
together with the previous commit.
Axel Beckert
7 years ago
41 | 41 |
|
42 | 42 |
# First check if apt-get is sane enough before proceeding
|
43 | 43 |
set +e
|
44 | |
apt-get -q2 --print-uris download "dpkg" 2>/dev/null >/dev/null
|
45 | |
if [ $? -ne 0 ] ; then
|
46 | |
echo "ERROR: There was an error calling apt-get. Check that the database is in a consistent state and try again"
|
47 | |
exit 1
|
48 | |
fi
|
49 | 44 |
if ! ls /var/lib/apt/lists/ |grep Release >/dev/null; then
|
50 | 45 |
echo "ERROR: Your apt lists are empty. Update your package database"
|
51 | 46 |
echo "using 'apt-get update'"
|
1 | 1 |
|
2 | 2 |
* Make debget a lightweight wrapper around "apt-get download". Speeds up
|
3 | 3 |
script by up to factor 2. (Closes: #821156, #733465, #733471)
|
|
4 |
* debget: Don't check if apt-get works properly first. Speeds script up
|
|
5 |
again by up to factor 2.
|
4 | 6 |
|
5 | 7 |
-- Axel Beckert <abe@debian.org> Sat, 22 Apr 2017 01:48:14 +0200
|
6 | 8 |
|