Codebase list debian-goodies / 990ad0e
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 7 years ago
2 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
22 * Add a rudimentary which-pkg-broke-build. (It's a wrapper around
33 which-pkg-broke which does the same but for build dependencies;
44 closes: #795812)
5 * debmany:
6 + Fix error message upon non-existing package.
57
68 -- Axel Beckert <abe@debian.org> Thu, 08 Sep 2016 09:20:01 +0200
79
265265 if [ -z "$aptdata" ]
266266 then
267267 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"_`
269269 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
271271 error "Apt-get might not be working properly Possible failure when running 'apt-get -q2 --print-uris --reinstall install \"$package\"'"
272272 else
273273 error "The package does not exist."