[SCM] live-helper branch, debian, updated. debian/2.0_a3-1-13-gb6e3279

Daniel Baumann daniel at debian.org
Tue Jan 12 04:40:15 UTC 2010


The following commit has been merged in the debian branch:
commit b6e32790c0b8c9d8d9a769dab227a4a0b979f256
Author: Daniel Baumann <daniel at debian.org>
Date:   Tue Jan 12 05:36:45 2010 +0100

    Automatically setting-up backports repository when specifying lenny-backports as target distribution.

diff --git a/helpers/lh_config b/helpers/lh_config
index 3edd816..83a8242 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -381,7 +381,15 @@ Local_arguments ()
 
 			-d|--distribution)
 				LH_DISTRIBUTION="${2}"
+				BACKPORTS="false"
 				shift 2
+
+				case "${LH_DISTRIBUTION}" in
+					lenny-backports)
+						LH_DISTRIBUTION="lenny"
+						BACKPORTS="true"
+						;;
+				esac
 				;;
 
 			-m|--mirror-bootstrap)
@@ -1263,5 +1271,34 @@ then
 	fi
 fi
 
+if [ "${BACKPORTS}" = "true" ]
+then
+	# Adding sources.list entry
+
+cat > config/chroot_sources/${LH_DISTRIBUTION}-backports.chroot << EOF
+# Backports Maintainers
+deb http://backports.debian-maintainers.org/ ${LH_DISTRIBUTION}/backports main contrib non-free
+deb-src http://backports.debian-maintainers.org/ ${LH_DISTRIBUTION}/backports main contrib non-free
+EOF
+
+	cp config/chroot_sources/${LH_DISTRIBUTION}-backports.chroot config/chroot_sources/${LH_DISTRIBUTION}-backports.binary
+
+	# Adding apt preferences
+	if ! grep -qs "^Pin: release o=backports.debian-maintainerns.org" config/chroot_apt/preferences
+	then
+
+cat >> config/chroot_apt/preferences << EOF
+Package: *
+Pin: release o=backports.debian-maintainerns.org
+Pin-Priority: 999
+EOF
+
+	fi
+
+	# Addding archive signing key
+	wget -q http://backports.debian-maintainers.org/project/openpgp/archive-key.asc -O config/chroot_sources/${LH_DISTRIBUTION}-backports.chroot.gpg
+	cp config/chroot_sources/${LH_DISTRIBUTION}-backports.chroot.gpg config/chroot_sources/${LH_DISTRIBUTION}-backports.binary.gpg
+fi
+
 # Creating stage file
 Create_stagefile .stage/config

-- 
live-helper



More information about the debian-live-changes mailing list