Codebase list debian-goodies / 58bc56a
Allow error in apt calls since those are handled by the script Javier Fernandez-Sanguino 11 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
4040 esac
4141
4242 # First check if apt-get is sane enough before proceeding
43 set +e
4344 apt-get -q2 --print-uris --reinstall install "dpkg" 2>/dev/null >/dev/null
4445 if [ $? -ne 0 ] ; then
4546 echo "ERROR: There was an error calling apt-get. Check that the database is in a consistent state and try again"
4950 echo "ERROR: Your apt lists are empty. Update your package database"
5051 echo "using 'apt-get update'"
5152 fi
53 set -e
5254
5355
5456 for pkgspec in $*; do
57 set +e
5558 apt-get -q2 --print-uris --reinstall install "$pkgspec" 2>/dev/null >/dev/null
5659 if [ $? -ne 0 ] ; then
5760 echo "ERROR: There is no '$pkgspec' package. Sorry."
5962 echo "package database using 'apt-get update'"
6063 continue
6164 fi
65 set -e
6266 # This provides only one version, but it's better than the apt-get
6367 # call which will not work in packages not available locally
6468 apt-cache show "$pkgspec" 2>/dev/null | grep ^Ver |