[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#255651: Acknowledgement (base-config: apt-config should ask for proxy if not configured)



Quoting Colin Watson (cjwatson@debian.org):
> On Tue, Jun 22, 2004 at 06:14:47PM +0200, Christian Perrier wrote:
> > The attached patch should allow apt-setup asking about a proxy is no
> > proxy has been setup yet.
> > 
> > This patch is *untested*. 
> 
> The patch has no context, so will break as soon as lines are added above
> that point in that file; 'diff -u' would be better.

...and is usually what I use. No idea why I forgot this time.

Here's the context diff


--- apt-setup.ori	2004-06-22 18:09:41.000000000 +0200
+++ apt-setup	2004-06-22 18:13:42.000000000 +0200
@@ -625,6 +625,14 @@
 	db_go || true
 	db_get apt-setup/security-updates
 	if [ "$RET" = true ]; then
+		# Ask about a proxy if no proxy is yet defined.
+		if [ -z "$http_proxy" ]; then
+			if [ ! -e "$APTETC/apt.conf" ] || \
+			   ! grep -iq 'Acquire::http::Proxy' $APTETC/apt.conf; then
+				db_input high mirror/http/proxy || true
+				db_go || continue
+			fi
+		fi
 		# Test it.
 		tmpsources=`tempfile`
 		echo "deb $LINE" > $tmpsources

Reply to: