Fix wrong error "no package" if package already had been downloaded
Closes: #847732
Axel Beckert
6 years ago
4 | 4 |
closes: #795812)
|
5 | 5 |
* debmany:
|
6 | 6 |
+ Fix error message upon non-existing package.
|
|
7 |
+ Fix wrong error "no package" if package already had been
|
|
8 |
downloaded. (Closes: #847732)
|
7 | 9 |
|
8 | 10 |
-- Axel Beckert <abe@debian.org> Thu, 08 Sep 2016 09:20:01 +0200
|
9 | 11 |
|
260 | 260 |
|
261 | 261 |
if [ -z "$file" ]
|
262 | 262 |
then
|
263 | |
debug "Mode3: Determining the path of '$package' using 'apt-get -q2 --print-uris --reinstall install'" # comment
|
264 | |
aptdata=`apt-get -q2 --print-uris --reinstall install "$package" 2>/dev/null | grep "$package"_`
|
|
263 |
debug "Mode3: Determining the path of '$package' using 'apt-get -q2 --print-uris download'" # comment
|
|
264 |
aptdata=`apt-get -q2 --print-uris download "$package" 2>/dev/null | grep "$package"_`
|
265 | 265 |
if [ -z "$aptdata" ]
|
266 | 266 |
then
|
267 | 267 |
errormsg "There was an error looking for package '$package'."
|
268 | |
aptdata=`apt-get -q2 --print-uris --reinstall install "apt" 2>/dev/null | grep "apt"_`
|
|
268 |
aptdata=`apt-get -q2 --print-uris download "apt" 2>/dev/null | grep "apt"_`
|
269 | 269 |
if [ $? -ne 0 ] || [ -z "$aptdata" ] ; then
|
270 | 270 |
# If looking for apt fails then there is something amiss
|
271 | 271 |
error "Apt-get might not be working properly Possible failure when running 'apt-get -q2 --print-uris --reinstall install \"$package\"'"
|