debget: Use "apt-get download" instead of "apt-get --reinstall install"
Main difference: no dependency resolution which may hinder downloading
packages which are in conflict with installed packages (e.g. an init
system or MTA which is not the currently installed one).
Closes: #733465
Axel Beckert
7 years ago
41 | 41 |
|
42 | 42 |
# First check if apt-get is sane enough before proceeding
|
43 | 43 |
set +e
|
44 | |
apt-get -q2 --print-uris --reinstall install "dpkg" 2>/dev/null >/dev/null
|
|
44 |
apt-get -q2 --print-uris download "dpkg" 2>/dev/null >/dev/null
|
45 | 45 |
if [ $? -ne 0 ] ; then
|
46 | 46 |
echo "ERROR: There was an error calling apt-get. Check that the database is in a consistent state and try again"
|
47 | 47 |
exit 1
|
|
55 | 55 |
|
56 | 56 |
for pkgspec in $*; do
|
57 | 57 |
set +e
|
58 | |
apt-get -q2 --print-uris --reinstall install "$pkgspec" 2>/dev/null >/dev/null
|
|
58 |
apt-get -q2 --print-uris download "$pkgspec" 2>/dev/null >/dev/null
|
59 | 59 |
if [ $? -ne 0 ] ; then
|
60 | 60 |
echo "ERROR: There is no '$pkgspec' package. Sorry."
|
61 | 61 |
echo "If you believe the package exists then consider updating your"
|
|
70 | 70 |
version=`echo $version | sed -ne '$s/^.*: \(.*\).*$/\1/p'`
|
71 | 71 |
echo "($pkgspec -> $version)"
|
72 | 72 |
done
|
73 | |
aptdata=$(apt-get -q2 --print-uris --reinstall install "$pkgspec" 2>/dev/null | grep -F "/${pkgspec}_")
|
|
73 |
aptdata=$(apt-get -q2 --print-uris download "$pkgspec" 2>/dev/null | grep -F "/${pkgspec}_")
|
74 | 74 |
if [ -z "$aptdata" ] ; then
|
75 | 75 |
echo "ERROR: No APT data returned for '$pkgspec'. Sorry."
|
76 | 76 |
echo "This is probably because the package is in the local apt cache"
|
0 | 0 |
debian-goodies (0.71) UNRELEASED; urgency=medium
|
1 | 1 |
|
2 | |
* debget (and therefore debman): Support apt-transport-tor i.e.
|
3 | |
tor+http:// and tor+https:// APT repository URLs. (Closes: #821156)
|
|
2 |
* debget (and therefore also debman):
|
|
3 |
+ Support apt-transport-tor i.e. tor+http:// and tor+https:// APT
|
|
4 |
repository URLs. (Closes: #821156)
|
|
5 |
+ Replace "apt-get --print-uris --reinstall install" with "apt-get
|
|
6 |
--print-uris download" to avoid dependency resolution before
|
|
7 |
printing URLs. (Closes: #733465)
|
4 | 8 |
|
5 | 9 |
-- Axel Beckert <abe@debian.org> Sat, 22 Apr 2017 01:48:14 +0200
|
6 | 10 |
|