diff options
author | Daniel Baumann <daniel@debian.org> | 2012-02-04 22:49:05 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-02-06 23:15:13 +0100 |
commit | 3f62ac0a3d7984f1ea0f555a056c5220a2b33a84 (patch) | |
tree | 167fc62b9df9d385bce2733968820077905091c1 /scripts | |
parent | bd9b635a0a867d6b5ffe2e32ffe142374f856096 (diff) | |
download | vyos-live-build-3f62ac0a3d7984f1ea0f555a056c5220a2b33a84.tar.gz vyos-live-build-3f62ac0a3d7984f1ea0f555a056c5220a2b33a84.zip |
Cleaning up handling of apt preferences when building in progress mode.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/lb_chroot_apt | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/scripts/build/lb_chroot_apt b/scripts/build/lb_chroot_apt index 2c79ee6d1..710b2e032 100755 --- a/scripts/build/lb_chroot_apt +++ b/scripts/build/lb_chroot_apt @@ -152,28 +152,36 @@ case "${1}" in then _DISTRIBUTION="$(echo ${LB_DISTRIBUTION} | sed -e 's|-backports||')" - _DISTRIBUTIONS="${_DISTRIBUTION}" + _ENABLE_DISTRIBUTIONS="${_DISTRIBUTION}" + _DISABLE_DISTRIBUTIONS="" if [ "${LB_SECURITY}" = "true" ] then - _DISTRIBUTIONS="${_DISTRIBUTIONS} ${_DISTRIBUTION}-security" + _ENABLE_DISTRIBUTIONS="${_ENABLE_DISTRIBUTIONS} ${_DISTRIBUTION}-security" fi if [ "${LB_VOLATILE}" = "true" ] then - _DISTRIBUTIONS="${_DISTRIBUTIONS} ${_DISTRIBUTION}-updates" + _ENABLE_DISTRIBUTIONS="${_ENABLE_DISTRIBUTIONS} ${_DISTRIBUTION}-updates" fi case "${LB_DISTRIBUTION}" in *-backports) - if [ "${LB_BACKPORTS}" = "true" ] + if [ "${LB_BACKPORTS}" = "true" ] then - _DISTRIBUTIONS="${_DISTRIBUTIONS} ${_DISTRIBUTION}-backports" + _ENABLE_DISTRIBUTIONS="${_ENABLE_DISTRIBUTIONS} ${_DISTRIBUTION}-backports" + fi + ;; + + *) + if [ "${LB_BACKPORTS}" = "true" ] + then + _DISABLE_DISTRIBUTIONS="${_DISABLE_DISTRIBUTIONS} ${_DISTRIBUTION}-backports" fi ;; esac - for _DISTRIBUTION in ${_DISTRIBUTIONS} + for _DISTRIBUTION in ${_ENABLE_DISTRIBUTIONS} do cat >> chroot/etc/apt/preferences.d/progress.pref << EOF @@ -184,20 +192,32 @@ Pin-Priority: 999 EOF done - fi - case "${LB_DISTRIBUTION}" in - artax-backports) - # Temporary hack to avoid squashfs version mismatch + for _DISTRIBUTION in ${_DISABLE_DISTRIBUTIONS} + do + +cat >> chroot/etc/apt/preferences.d/progress.pref << EOF -cat >> chroot/etc/apt/preferences.d/tmp.pref << EOF +#Package: * +#Pin: release n=${_DISTRIBUTION} +#Pin-Priority: 999 +EOF + + done + + # Add temporary hack to avoid squashfs version mismatch + case "${LB_DISTRIBUTION}" in + artax-backports) + +cat >> chroot/etc/apt/preferences.d/progress.tmp.pref << EOF Package: squashfs-tools Pin: release n=squeeze Pin-Priority: 1001 EOF ;; - esac + esac + fi ;; esac @@ -302,6 +322,9 @@ EOF fi + # Remove temporary hack to avoid squashfs version mismatch for artax-backports + rm -f chroot/etc/apt/preferences.d/progress.tmp.pref + # Removing stage file rm -f .stage/chroot_apt ;; |