summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-01-12 05:36:45 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:17:03 +0100
commitc7354cfe47098e1abf9304a5cbff02d28b01ffd8 (patch)
tree35cc06581791a97604507f095de0f24c693cf490 /helpers
parent4a3d0ebf17d290053016e316e1c1cee91197fa56 (diff)
downloadvyos-live-build-c7354cfe47098e1abf9304a5cbff02d28b01ffd8.tar.gz
vyos-live-build-c7354cfe47098e1abf9304a5cbff02d28b01ffd8.zip
Automatically setting-up backports repository when specifying lenny-backports as target distribution.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_config37
1 files changed, 37 insertions, 0 deletions
diff --git a/helpers/lh_config b/helpers/lh_config
index 3edd816bc..83a824263 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