debmany: Fix error message upon non-existing package
If debmany encountered an error after calling apt-get it tried to
determine if apt-get works in general by checking if the same command
succeeds for a well-known and always existing package. Unfortunately
it used "apt-get" instead of "apt" for that test and hence always
failed, because there never was a package called "apt-get". There
always was just "apt" with regards to package names.
Axel Beckert
6 years ago
2 | 2 |
* Add a rudimentary which-pkg-broke-build. (It's a wrapper around
|
3 | 3 |
which-pkg-broke which does the same but for build dependencies;
|
4 | 4 |
closes: #795812)
|
|
5 |
* debmany:
|
|
6 |
+ Fix error message upon non-existing package.
|
5 | 7 |
|
6 | 8 |
-- Axel Beckert <abe@debian.org> Thu, 08 Sep 2016 09:20:01 +0200
|
7 | 9 |
|
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-get" 2>/dev/null | grep "apt-get"_`
|
|
268 |
aptdata=`apt-get -q2 --print-uris --reinstall install "apt" 2>/dev/null | grep "apt"_`
|
269 | 269 |
if [ $? -ne 0 ] || [ -z "$aptdata" ] ; then
|
270 | |
# If looking for apt-get fails then there is something amiss
|
|
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\"'"
|
272 | 272 |
else
|
273 | 273 |
error "The package does not exist."
|