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

Bug#261555: add security updates for testing



tag 261555 patch
thanks

On Mon, Jul 26, 2004 at 01:55:20PM -0400, Joey Hess wrote:
> apt-setup should add security.debian.org entries for testing, using the
> testing security updates repo there, even though that repo is not really
> used currently

I think the attached patch should do the right thing.

-- 
Matt Kraai            kraai@ftbfs.org            http://ftbfs.org/
Index: apt-setup
===================================================================
--- apt-setup	(revision 1173)
+++ apt-setup	(working copy)
@@ -594,15 +594,12 @@
 # * already have it in sources.list, uncommented: don't ask about it
 # * unstable does not need security.debian.org, so try not to even ask
 #   if that's all they have in sources.list
-# * testing should not get security.debian.org, since it only has updates
-#   for stable, which have been known to add package to tasks and break
-#   things
 # * installing from CD; no network connectivity: add it, commented out
 # * adding it when the user has picked non-free and/or contrib at least
 #   some of the time: include those
 # * adding it when the user has not: don't include those
 
-if apt-cache policy | grep "o=Debian,a=" | grep -E -qv 'a=(unstable|testing)' && \
+if apt-cache policy | grep "o=Debian,a=" | grep -qv 'a=unstable' && \
    ! grep -q '^[^#]*security.debian.org' ${APTETC}sources.list; then
 	# Figure out what line to add (we're definitely going to add something,
 	# even if it's just a comment).
@@ -615,8 +612,16 @@
 			DISTS="$DISTS $dist"
 		fi
 	done
-	LINE="http://security.debian.org/ stable/updates $DISTS"
 
+	# Figure out which suite to use.
+	if apt-cache policy | grep "o=Debian,a=" | grep -q 'a=testing'; then
+	    SUITE="testing"
+	else
+	    SUITE="stable"
+	fi
+
+	LINE="http://security.debian.org/ $SUITE/updates $DISTS"
+
 	COMMENT="# "
 
 	# Now ask if they want the entry to be added.

Attachment: signature.asc
Description: Digital signature


Reply to: