diff options
author | Daniel Baumann <daniel@debian.org> | 2010-01-12 05:36:45 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2010-01-12 05:36:45 +0100 |
commit | d1f3fcab0ec2d3d8b651ccd225a3b2de1b88c208 (patch) | |
tree | 35cc06581791a97604507f095de0f24c693cf490 | |
parent | bf343607c12ca5144056742f8da46d526930c98c (diff) | |
download | vyos-live-build-d1f3fcab0ec2d3d8b651ccd225a3b2de1b88c208.tar.gz vyos-live-build-d1f3fcab0ec2d3d8b651ccd225a3b2de1b88c208.zip |
Automatically setting-up backports repository when specifying lenny-backports as target distribution.
-rwxr-xr-x | helpers/lh_config | 37 |
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 |