Codebase list debian-goodies / fd26ef1
Also detect if apt-get returns with non-error value but fails to provide URIs Javier Fernandez-Sanguino 8 years ago
1 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
253253 if [ -z "$aptdata" ]
254254 then
255255 errormsg "There was an error looking for package '$package'."
256 apt-get -q2 --print-uris --reinstall install "dpkg" 2>&1 >/dev/null
257 if [ $? -eq 0 ] ; then
256 aptdata=`apt-get -q2 --print-uris --reinstall install "apt-get" 2>/dev/null | grep "apt-get"_`
257 if [ $? -ne 0 ] || [ -z "$aptdata" ] ; then
258 # If looking for apt-get fails then there is something amiss
259 error "Apt-get might not be working properly Possible failure when running 'apt-get -q2 --print-uris --reinstall install \"$package\"'"
260 else
258261 error "The package does not exist."
259 else
260 error "Apt-get might not be working properly Possible failure when running 'apt-get -q2 --print-uris --reinstall install \"$package\"'"
261262 fi
262263 # Note: We do not get here, error() exits before
263264 exit 1