Codebase list live-build / 2536051
Implement use of different distributions for build and runtime usage Raphaƫl Hertzog 6 years ago
15 changed file(s) with 155 addition(s) and 111 deletion(s). Raw diff Collapse all Expand all
118118 case "${LB_MODE}" in
119119 progress-linux)
120120 LB_DISTRIBUTION="${LB_DISTRIBUTION:-cairon}"
121 LB_DISTRIBUTION="${LB_DISTRIBUTION:-cairon}"
121122 LB_DERIVATIVE="true"
122123 LB_DERIVATIVE_IS_BASED_ON="debian"
123124 ;;
127128 LB_DERIVATIVE="false"
128129 ;;
129130 esac
131 LB_DISTRIBUTION_CHROOT="${LB_DISTRIBUTION_CHROOT:-${LB_DISTRIBUTION}}"
132 LB_DISTRIBUTION_BINARY="${LB_DISTRIBUTION_BINARY:-${LB_DISTRIBUTION_CHROOT}}"
133
130134
131135 case "${LB_MODE}" in
132136 progress-linux)
133137 case "${LB_DISTRIBUTION}" in
134138 baureo|baureo-backports)
135139 LB_PARENT_DISTRIBUTION="${LB_PARENT_DISTRIBUTION:-wheezy}"
136 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_PARENT_DISTRIBUTION}}"
137140 ;;
138141
139142 cairon|cairon-backports)
140143 LB_PARENT_DISTRIBUTION="${LB_PARENT_DISTRIBUTION:-sid}"
141 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_PARENT_DISTRIBUTION}}"
142144 ;;
143145 esac
144146
146148 ;;
147149
148150 *)
149 LB_PARENT_DISTRIBUTION="${LB_PARENT_DISTRIBUTION:-${LB_DISTRIBUTION}}"
150 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_PARENT_DISTRIBUTION}}"
151
152151 LB_BACKPORTS="${LB_BACKPORTS:-false}"
153152 ;;
154153 esac
154 if [ -n "$LB_PARENT_DISTRIBUTION" ]; then
155 LB_PARENT_DISTRIBUTION_CHROOT="${LB_PARENT_DISTRIBUTION_CHROOT:-${LB_PARENT_DISTRIBUTION}}"
156 LB_PARENT_DISTRIBUTION_BINARY="${LB_PARENT_DISTRIBUTION_BINARY:-${LB_PARENT_DISTRIBUTION}}"
157 else
158 LB_PARENT_DISTRIBUTION_CHROOT="${LB_PARENT_DISTRIBUTION_CHROOT:-${LB_DISTRIBUTION_CHROOT}}"
159 LB_PARENT_DISTRIBUTION_BINARY="${LB_PARENT_DISTRIBUTION_BINARY:-${LB_DISTRIBUTION_BINARY}}"
160 fi
161 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_PARENT_DISTRIBUTION_CHROOT}}"
155162
156163 # Setting package manager
157164 LB_APT="${LB_APT:-apt}"
478485 LB_LINUX_PACKAGES="${LB_LINUX_PACKAGES:-linux-image}"
479486
480487 # Setting security updates option
481 case "${LB_PARENT_DISTRIBUTION}" in
488 case "${LB_PARENT_DISTRIBUTION_BINARY}" in
482489 sid)
483490 LB_SECURITY="${LB_SECURITY:-false}"
484491 ;;
489496 esac
490497
491498 # Setting updates updates option
492 case "${LB_PARENT_DISTRIBUTION}" in
499 case "${LB_PARENT_DISTRIBUTION_BINARY}" in
493500 sid)
494501 LB_UPDATES="${LB_UPDATES:-false}"
495502 ;;
192192
193193 Echo_breakage ()
194194 {
195 case "${LB_PARENT_DISTRIBUTION}" in
195 case "${LB_PARENT_DISTRIBUTION_BINARY}" in
196196 sid)
197197 Echo_message "If the following stage fails, the most likely cause of the problem is with your mirror configuration, a caching proxy or the sid distribution."
198198 ;;
4848 mkdir -p binary/.disk
4949
5050 ARCHITECTURE="$(echo ${LB_ARCHITECTURES} | sed -e 's| |/|g')"
51 DISTRIBUTION="$(echo ${LB_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')"
52 DISTRIBUTION="${DISTRIBUTION}$(echo ${LB_DISTRIBUTION} | cut -b 2-)"
51 DISTRIBUTION="$(echo ${LB_DISTRIBUTION_BINARY} | cut -b 1 | tr '[a-z]' '[A-Z]')"
52 DISTRIBUTION="${DISTRIBUTION}$(echo ${LB_DISTRIBUTION_BINARY} | cut -b 2-)"
5353
5454 if [ -e chroot/etc/os-release ]
5555 then
110110 do
111111 if [ -e "${LOCATION}" ]
112112 then
113 cp "${LOCATION}/${LB_PARENT_DISTRIBUTION}/${LB_ARCHITECTURES}_udeb_include" binary/.disk/udeb_include
113 cp "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURES}_udeb_include" binary/.disk/udeb_include
114114
115115 continue
116116 fi
135135 do
136136 if [ -e "${LOCATION}" ]
137137 then
138 cp "${LOCATION}/${LB_PARENT_DISTRIBUTION}/${LB_ARCHITECTURES}_netinst_udeb_include" binary/.disk/udeb_include
138 cp "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURES}_netinst_udeb_include" binary/.disk/udeb_include
139139
140140 continue
141141 fi
158158 do
159159 if [ -e "${LOCATION}" ]
160160 then
161 cp "${LOCATION}/${LB_PARENT_DISTRIBUTION}/${LB_ARCHITECTURES}_businesscard_udeb_include" binary/.disk/udeb_include
161 cp "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURES}_businesscard_udeb_include" binary/.disk/udeb_include
162162
163163 continue
164164 fi
140140
141141 SECTION="$(basename ${SECTION})"
142142
143 mkdir -p ${DISTS}/${LB_PARENT_DISTRIBUTION}/${SECTION}/binary-${LB_ARCHITECTURES}
144 apt-ftparchive packages ${POOL}/${SECTION} > ${DISTS}/${LB_PARENT_DISTRIBUTION}/${SECTION}/binary-${LB_ARCHITECTURES}/Packages
145 gzip -9 -c ${DISTS}/${LB_PARENT_DISTRIBUTION}/${SECTION}/binary-${LB_ARCHITECTURES}/Packages > ${DISTS}/${LB_PARENT_DISTRIBUTION}/${SECTION}/binary-${LB_ARCHITECTURES}/Packages.gz
143 mkdir -p ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURES}
144 apt-ftparchive packages ${POOL}/${SECTION} > ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURES}/Packages
145 gzip -9 -c ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURES}/Packages > ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURES}/Packages.gz
146146 done
147147
148148 cd "${OLDPWD}"
203203
204204 _VERSION="${_VERSION:-none}"
205205
206 _DISTRIBUTION="${LB_DISTRIBUTION}"
206 _DISTRIBUTION="${LB_DISTRIBUTION_BINARY}"
207207 _ARCHITECTURE="${LB_ARCHITECTURES}"
208208
209209 _DATE=$(date -R)
241241 -e "s#@APPEND_INSTALL_FAILSAFE@#${LB_BOOTAPPEND_INSTALL_FAILSAFE}#g" \
242242 -e "s|@PROJECT@|${_PROJECT}|g" \
243243 -e "s|@DISTRIBUTION@|${_DISTRIBUTION}|g" \
244 -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \
244 -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION_BINARY}|g" \
245245 -e "s|@VERSION@|${_VERSION}|g" \
246246 -e "s|@ARCHITECTURE@|${_ARCHITECTURE}|g" \
247247 -e "s|@DATE@|${_DATE}|g" \
6464 fi
6565
6666 cat > chroot/etc/apt/${_PARENT_FILE} << EOF
67 deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}
67 deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT} ${LB_PARENT_ARCHIVE_AREAS}
6868 EOF
6969
7070 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
7171 then
72 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
72 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
7373 fi
7474
7575 if [ "${LB_DERIVATIVE}" = "true" ]
7676 then
7777 rm -f chroot/etc/apt/sources.list.d/${LB_MODE}.list
7878
79 _DISTRIBUTION="$(echo ${LB_DISTRIBUTION} | sed -e 's|-backports||')"
79 _DISTRIBUTION="$(echo ${LB_DISTRIBUTION_CHROOT} | sed -e 's|-backports||')"
8080
8181 echo "deb ${LB_MIRROR_CHROOT} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
8282
9090 then
9191 case "${LB_MODE}" in
9292 debian|progress-linux)
93 case "${LB_PARENT_DISTRIBUTION}" in
93 case "${LB_PARENT_DISTRIBUTION_CHROOT}" in
9494 sid)
9595
9696 ;;
9797
9898 *)
99 echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
99 echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION_CHROOT}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
100100
101101 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
102102 then
103 echo "deb-src ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
103 echo "deb-src ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION_CHROOT}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
104104 fi
105105 ;;
106106 esac
130130
131131 if [ "${LB_UPDATES}" = "true" ]
132132 then
133 echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
133 echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
134134
135135 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
136136 then
137 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
137 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
138138 fi
139139
140140 if [ "${LB_DERIVATIVE}" = "true" ]
152152 then
153153 case "${LB_MODE}" in
154154 debian)
155 if [ "${LB_PARENT_DISTRIBUTION}" != "sid" ]
155 if [ "${LB_PARENT_DISTRIBUTION_CHROOT}" != "sid" ]
156156 then
157 echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
157 echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
158158
159159 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
160160 then
161 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
161 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
162162 fi
163163 fi
164164 ;;
180180 do
181181 if [ -e "${FILE}" ]
182182 then
183 sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \
184 -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \
183 sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION_CHROOT}|g" \
184 -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION_CHROOT}|g" \
185185 -e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \
186186 -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \
187187 "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)"
8787 fi
8888
8989 Echo_breakage "Running debootstrap (download-only)... "
90 debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
90 debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
9191
9292 # Removing old cache
9393 rm -f cache/packages.bootstrap/*.deb
108108 fi
109109
110110 Echo_message "Bootstrap will be foreign"
111 debootstrap ${DEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
111 debootstrap ${DEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
112112
113113 Echo_message "Running debootstrap second stage under QEMU"
114114 cp ${LB_BOOTSTRAP_QEMU_STATIC} chroot/usr/bin
115115 Chroot chroot /bin/sh /debootstrap/debootstrap --second-stage ${FOREIGN_DEBOOTSTRAP_OPTIONS}
116116 else
117 debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
117 debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
118118 fi
119119
120120 # Deconfiguring debootstrap configurations
6565 Check_defaults
6666
6767 Echo_message "live-build ${LIVE_BUILD_VERSION}"
68 Echo_message "Building config tree for a ${LB_MODE}/${LB_DISTRIBUTION}/${LB_ARCHITECTURES} system"
68 Echo_message "Building config tree for a ${LB_MODE}/${LB_DISTRIBUTION_BINARY}/${LB_ARCHITECTURES} system"
6969
7070 # Bootstrapping system
7171 lb bootstrap ${@}
149149 progress-linux)
150150 if [ ! -e chroot/etc/apt/preferences.d/progress-linux.pref ]
151151 then
152 _DISTRIBUTION="$(echo ${LB_DISTRIBUTION} | sed -e 's|-backports||')"
152 _DISTRIBUTION="$(echo ${LB_DISTRIBUTION_BINARY} | sed -e 's|-backports||')"
153153
154154 _ENABLE_DISTRIBUTIONS="${_DISTRIBUTION}"
155155 _DISABLE_DISTRIBUTIONS=""
164164 _ENABLE_DISTRIBUTIONS="${_ENABLE_DISTRIBUTIONS} ${_DISTRIBUTION}-updates"
165165 fi
166166
167 case "${LB_DISTRIBUTION}" in
167 case "${LB_DISTRIBUTION_BINARY}" in
168168 *-backports)
169169 if [ "${LB_BACKPORTS}" = "true" ]
170170 then
6363 fi
6464
6565 cat > chroot/etc/apt/${_PARENT_FILE} << EOF
66 deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}
66 deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT} ${LB_PARENT_ARCHIVE_AREAS}
6767 EOF
6868
6969 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
7070 then
71 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
71 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
7272 fi
7373
7474 if [ "${LB_DERIVATIVE}" = "true" ]
7575 then
7676 rm -f chroot/etc/apt/sources.list.d/${LB_MODE}.list
7777
78 _DISTRIBUTION="$(echo ${LB_DISTRIBUTION} | sed -e 's|-backports||')"
78 _DISTRIBUTION="$(echo ${LB_DISTRIBUTION_CHROOT} | sed -e 's|-backports||')"
7979
8080 echo "deb ${LB_MIRROR_CHROOT} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
8181
8989 then
9090 case "${LB_MODE}" in
9191 debian|progress-linux)
92 case "${LB_PARENT_DISTRIBUTION}" in
92 case "${LB_PARENT_DISTRIBUTION_CHROOT}" in
9393 sid)
9494
9595 ;;
9696
9797 *)
98 echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
98 echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION_CHROOT}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
9999
100100 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
101101 then
102 echo "deb-src ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
102 echo "deb-src ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION_CHROOT}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
103103 fi
104104 ;;
105105 esac
129129
130130 if [ "${LB_UPDATES}" = "true" ]
131131 then
132 echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
132 echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
133133
134134 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
135135 then
136 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
136 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
137137 fi
138138
139139 if [ "${LB_DERIVATIVE}" = "true" ]
151151 then
152152 case "${LB_MODE}" in
153153 debian)
154 if [ "${LB_PARENT_DISTRIBUTION}" != "sid" ]
155 then
156 echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
154 if [ "${LB_PARENT_DISTRIBUTION_CHROOT}" != "sid" ]
155 then
156 echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
157157
158158 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
159159 then
160 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
160 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
161161 fi
162162 fi
163163 ;;
179179 do
180180 if [ -e "${FILE}" ]
181181 then
182 sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \
183 -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \
182 sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION_CHROOT}|g" \
183 -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION_CHROOT}|g" \
184184 -e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \
185185 -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \
186186 "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)"
462462 # Configure custom sources.list
463463
464464 cat > chroot/etc/apt/${_PARENT_FILE} << EOF
465 deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}
465 deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION_BINARY} ${LB_PARENT_ARCHIVE_AREAS}
466466 EOF
467467
468468 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
469469 then
470 echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
470 echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION_BINARY} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
471471 fi
472472
473473 if [ "${LB_DERIVATIVE}" = "true" ]
474474 then
475475 rm -f chroot/etc/apt/sources.list.d/${LB_MODE}.list
476476
477 _DISTRIBUTION="$(echo ${LB_DISTRIBUTION} | sed -e 's|-backports||')"
477 _DISTRIBUTION="$(echo ${LB_DISTRIBUTION_BINARY} | sed -e 's|-backports||')"
478478
479479 echo "deb ${LB_MIRROR_BINARY} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
480480
488488 then
489489 case "${LB_MODE}" in
490490 debian|progress-linux)
491 case "${LB_PARENT_DISTRIBUTION}" in
491 case "${LB_PARENT_DISTRIBUTION_BINARY}" in
492492 sid)
493493
494494 ;;
495495
496496 *)
497 echo "deb ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
497 echo "deb ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION_BINARY}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
498498
499499 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
500500 then
501 echo "deb-src ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
501 echo "deb-src ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION_BINARY}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
502502 fi
503503 ;;
504504 esac
528528
529529 if [ "${LB_UPDATES}" = "true" ]
530530 then
531 echo "deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
531 echo "deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION_BINARY}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
532532
533533 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
534534 then
535 echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
535 echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION_BINARY}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
536536 fi
537537
538538 if [ "${LB_DERIVATIVE}" = "true" ]
550550 then
551551 case "${LB_MODE}" in
552552 debian)
553 if [ "${LB_PARENT_DISTRIBUTION}" != "sid" ]
554 then
555 echo "deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
553 if [ "${LB_PARENT_DISTRIBUTION_BINARY}" != "sid" ]
554 then
555 echo "deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION_BINARY}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
556556
557557 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
558558 then
559 echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
559 echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION_BINARY}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
560560 fi
561561 fi
562562 ;;
605605 do
606606 if [ -e "${FILE}" ]
607607 then
608 sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \
609 -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \
608 sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION_BINARY}|g" \
609 -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION_BINARY}|g" \
610610 -e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \
611611 -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \
612612 "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .binary)"
5858
5959 FIRMWARE_PACKAGES=""
6060
61 _CONTENTS="$(for _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS}; do echo ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/${_PARENT_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)"
61 _CONTENTS="$(for _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS}; do echo ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION_CHROOT}/${_PARENT_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)"
6262
63 rm -f cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${LB_ARCHITECTURES}
63 rm -f cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
6464
6565 for _CONTENT in ${_CONTENTS}
6666 do
67 wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${LB_ARCHITECTURES}
67 wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
6868
69 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${LB_ARCHITECTURES} | sort -u)"
69 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} | sort -u)"
7070 done
7171
7272 if echo ${LB_PARENT_ARCHIVE_AREAS} | grep -qs "non-free"
9090 then
9191 # FIXME: account for the fact that PARENT_DISTRIBUTION and DISTRIBUTION might be the same (to not have overlapping cache files for contents).
9292
93 _CONTENTS="$(for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}; do echo ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)"
93 _CONTENTS="$(for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}; do echo ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION_CHROOT}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)"
9494
95 rm -f cache/contents.chroot/contents.${LB_DISTRIBUTION}.${LB_ARCHITECTURES}
95 rm -f cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
9696
9797 for _CONTENT in ${_CONTENTS}
9898 do
99 wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_DISTRIBUTION}.${LB_ARCHITECTURES}
99 wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
100100
101 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_DISTRIBUTION}.${LB_ARCHITECTURES} | sort -u)"
101 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} | sort -u)"
102102 done
103103 fi
104104
5656 \t [-d|--distribution CODENAME]\n\
5757 \t [--parent-distribution CODENAME]\n\
5858 \t [--parent-debian-installer-distribution CODENAME]\n\
59 \t [--distribution-chroot CODENAME]\n\
60 \t [--parent-distribution-chroot CODENAME]\n\
61 \t [--distribution-binary CODENAME]\n\
62 \t [--parent-distribution-binary CODENAME]\n\
5963 \t [--dump]\n\
6064 \t [--fdisk fdisk|fdisk.dist]\n\
6165 \t [--force]\n\
132136 cache-stages:,debconf-frontend:,debconf-priority:,dump,
133137 initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,tasksel:,
134138 architectures:,clean,
135 distribution:,parent-distribution:,parent-debian-installer-distribution:,parent-mirror-bootstrap:,parent-mirror-chroot:,parent-mirror-chroot-security:,parent-mirror-binary:,
139 distribution:,parent-distribution:,parent-debian-installer-distribution:,
140 distribution-chroot:,parent-distribution-chroot:,
141 distribution-binary:,parent-distribution-binary:,
142 parent-mirror-bootstrap:,parent-mirror-chroot:,parent-mirror-chroot-security:,parent-mirror-binary:,
136143 parent-mirror-binary-security:,parent-mirror-debian-installer:,
137144 mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,
138145 mirror-binary-security:,mirror-debian-installer:,
351358 shift 2
352359 ;;
353360
361 --distribution-chroot)
362 LB_DISTRIBUTION_CHROOT="${2}"
363 shift 2
364 ;;
365
366 --parent-distribution-chroot)
367 LB_PARENT_DISTRIBUTION_CHROOT="${2}"
368 shift 2
369 ;;
370
371 --distribution-binary)
372 LB_DISTRIBUTION_BINARY="${2}"
373 shift 2
374 ;;
375
376 --parent-distribution-binary)
377 LB_PARENT_DISTRIBUTION_BINARY="${2}"
378 shift 2
379 ;;
380
354381 -m|--parent-mirror-bootstrap)
355382 LB_PARENT_MIRROR_BOOTSTRAP="${2}"
356383 shift 2
878905
879906 if [ ! -e config ]
880907 then
881 Echo_message "Creating config tree for a ${LB_MODE}/${LB_DISTRIBUTION}/${LB_ARCHITECTURES} system"
908 Echo_message "Creating config tree for a ${LB_MODE}/${LB_DISTRIBUTION_BINARY}/${LB_ARCHITECTURES} system"
882909 mkdir config
883910 else
884 Echo_message "Updating config tree for a ${LB_MODE}/${LB_DISTRIBUTION}/${LB_ARCHITECTURES} system"
911 Echo_message "Updating config tree for a ${LB_MODE}/${LB_DISTRIBUTION_BINARY}/${LB_ARCHITECTURES} system"
885912 fi
886913
887914 # Creating live-build configuration
10181045 # \$LB_PARENT_DISTRIBUTION: select parent distribution to use
10191046 # (Default: ${LB_PARENT_DISTRIBUTION})
10201047 LB_PARENT_DISTRIBUTION="${LB_PARENT_DISTRIBUTION}"
1048
1049 # \$LB_DISTRIBUTION_CHROOT: select distribution to use in the chroot
1050 # (Default: ${LB_DISTRIBUTION_CHROOT})
1051 LB_DISTRIBUTION_CHROOT="${LB_DISTRIBUTION_CHROOT}"
1052
1053 # \$LB_PARENT_DISTRIBUTION_CHROOT: select parent distribution to use in the chroot
1054 # (Default: ${LB_PARENT_DISTRIBUTION_CHROOT})
1055 LB_PARENT_DISTRIBUTION_CHROOT="${LB_PARENT_DISTRIBUTION_CHROOT}"
1056
1057 # \$LB_DISTRIBUTION_BINARY: select distribution to use in the final image
1058 # (Default: ${LB_DISTRIBUTION_BINARY})
1059 LB_DISTRIBUTION_BINARY="${LB_DISTRIBUTION_BINARY}"
1060
1061 # \$LB_PARENT_DISTRIBUTION_BINARY: select parent distribution to use in the final image
1062 # (Default: ${LB_PARENT_DISTRIBUTION_BINARY})
1063 LB_PARENT_DISTRIBUTION_BINARY="${LB_PARENT_DISTRIBUTION_BINARY}"
10211064
10221065 # \$LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION: select parent distribution for debian-installer to use
10231066 # (Default: ${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION})
13851428 [Image]
13861429 Architecture: ${LB_ARCHITECTURES}
13871430 Archive-Areas: ${LB_ARCHIVE_AREAS}
1388 Distribution: ${LB_DISTRIBUTION}
1431 Distribution-Chroot: ${LB_DISTRIBUTION_CHROOT}
1432 Distribution-Binary: ${LB_DISTRIBUTION_BINARY}
13891433 Mirror-Bootstrap: ${LB_MIRROR_BOOTSTRAP}
13901434 EOF
13911435
13951439 cat >> config/build << EOF
13961440
13971441 Parent-Archive-Areas: ${LB_ARCHIVE_AREAS}
1398 Parent-Distribution: ${LB_PARENT_DISTRIBUTION}
1442 Parent-Distribution-Chroot: ${LB_PARENT_DISTRIBUTION_CHROOT}
1443 Parent-Distribution-Binary: ${LB_PARENT_DISTRIBUTION_BINARY}
13991444 Parent-Mirror-Bootstrap: ${LB_PARENT_MIRROR_BOOTSTRAP}
14001445 EOF
14011446
348348
349349 FIRMWARE_PACKAGES=""
350350
351 _CONTENTS="$(for _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS}; do echo ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/${_PARENT_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)"
352
353 rm -f cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${LB_ARCHITECTURES}
351 _CONTENTS="$(for _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS}; do echo ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION_CHROOT}/${_PARENT_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)"
352
353 rm -f cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
354354
355355 for _CONTENT in ${_CONTENTS}
356356 do
357 wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${LB_ARCHITECTURES}
358
359 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${LB_ARCHITECTURES} | sort -u)"
357 wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
358
359 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} | sort -u)"
360360 done
361361
362362 if echo ${LB_PARENT_ARCHIVE_AREAS} | grep -qs "non-free"
380380 then
381381 # FIXME: account for the fact that PARENT_DISTRIBUTION and DISTRIBUTION might be the same (to not have overlapping cache files for contents).
382382
383 _CONTENTS="$(for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}; do echo ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)"
384
385 rm -f cache/contents.chroot/contents.${LB_DISTRIBUTION}.${LB_ARCHITECTURES}
383 _CONTENTS="$(for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}; do echo ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION_CHROOT}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)"
384
385 rm -f cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
386386
387387 for _CONTENT in ${_CONTENTS}
388388 do
389 wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_DISTRIBUTION}.${LB_ARCHITECTURES}
390
391 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_DISTRIBUTION}.${LB_ARCHITECTURES} | sort -u)"
389 wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
390
391 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} | sort -u)"
392392 done
393393 fi
394394
671671 _LB_APT_VERSION_OPT='-o APT::FTPArchive::Release::Version="'"${_VERSION}"'"'
672672 fi
673673
674 case "${LB_PARENT_DISTRIBUTION}" in
674 case "${LB_PARENT_DISTRIBUTION_BINARY}" in
675675 sid)
676676 _SUITE="unstable"
677677 ;;
678678
679679 *)
680 _SUITE="${LB_PARENT_DISTRIBUTION}"
680 _SUITE="${LB_PARENT_DISTRIBUTION_BINARY}"
681681 ;;
682682 esac
683683
687687 -o APT::FTPArchive::Release::Label="Debian" \
688688 -o APT::FTPArchive::Release::Suite="${_SUITE}" \
689689 ${_LB_APT_VERSION_OPT} \
690 -o APT::FTPArchive::Release::Codename="${LB_PARENT_DISTRIBUTION}" \
690 -o APT::FTPArchive::Release::Codename="${LB_PARENT_DISTRIBUTION_BINARY}" \
691691 -o APT::FTPArchive::Release::Date="$(date -R)" \
692692 -o APT::FTPArchive::Release::Architectures="${LB_ARCHITECTURES}" \
693693 -o APT::FTPArchive::Release::Components="${LB_PARENT_ARCHIVE_AREAS}" \
699699 rm -f chroot/binary.sh
700700 mv chroot/root/binary ./
701701
702 case "${LB_PARENT_DISTRIBUTION}" in
703 jessie)
704 DISTRIBUTIONS="stable"
705 ;;
706
707 *)
708 DISTRIBUTIONS="stable testing unstable"
709 ;;
710 esac
711
712 if [ "${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}" != "${LB_PARENT_DISTRIBUTION}" ]
713 then
714 DISTRIBUTIONS="${DISTRIBUTIONS} ${LB_PARENT_DISTRIBUTION}"
702 DISTRIBUTIONS="stable testing unstable"
703
704 if [ "${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}" != "${LB_PARENT_DISTRIBUTION_BINARY}" ]
705 then
706 DISTRIBUTIONS="${DISTRIBUTIONS} ${LB_PARENT_DISTRIBUTION_BINARY}"
715707 fi
716708
717709 case "${LIVE_IMAGE_TYPE}" in
116116 # where available. workaround: disable backports
117117 case "${LB_MODE}" in
118118 progress-linux)
119 case "${LB_DISTRIBUTION}" in
119 case "${LB_DISTRIBUTION_BINARY}" in
120120 *-backports)
121121
122122 ;;
123123
124124 *)
125 if grep -qs "${LB_DISTRIBUTION}-backports" chroot/etc/apt/sources.list.d/progress-linux.list
125 if grep -qs "${LB_DISTRIBUTION_BINARY}-backports" chroot/etc/apt/sources.list.d/progress-linux.list
126126 then
127127 cp chroot/etc/apt/sources.list.d/progress-linux.list chroot/etc/apt/sources.list.d/progress-linux.list.orig
128128
129129 while read _LINE
130130 do
131 if echo "${_LINE}" | grep -qs ${LB_DISTRIBUTION}-backports
131 if echo "${_LINE}" | grep -qs ${LB_DISTRIBUTION_BINARY}-backports
132132 then
133133 sed -i -e "s|${_LINE}|#${_LINE}|" chroot/etc/apt/sources.list.d/progress-linux.list
134134 fi
4848
4949 mkdir -p source/.disk
5050
51 DISTRIBUTION="$(echo ${LB_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')"
52 DISTRIBUTION="${DISTRIBUTION}$(echo ${LB_DISTRIBUTION} | cut -b 2-)"
51 DISTRIBUTION="$(echo ${LB_DISTRIBUTION_BINARY} | cut -b 1 | tr '[a-z]' '[A-Z]')"
52 DISTRIBUTION="${DISTRIBUTION}$(echo ${LB_DISTRIBUTION_BINARY} | cut -b 2-)"
5353
5454 if [ -e chroot/etc/os-release ]
5555 then