diff options
Diffstat (limited to '')
-rwxr-xr-x | share/scripts/debconf | 156 |
1 files changed, 141 insertions, 15 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf index e8640fa..a9ddda1 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -420,16 +420,94 @@ Configure_apt () # Configure apt rm -f "${DIRECTORY}/etc/apt/sources.list" + rm -f "${DIRECTORY}"/etc/apt/sources.list.d/[0-9]*debian.sources PARENT_AREA="$(echo ${PARENT_ARCHIVE_AREAS} | sed -e 's|,| |g')" PARENT_DIST="$(echo ${PARENT_DISTRIBUTION} | sed -e 's|-backports||')" -cat > "${DIRECTORY}/etc/apt/sources.list.d/debian.list" << EOF -# /etc/apt/sources.list.d/debian.list + for PARENT_REPO in ${PARENT_ARCHIVES} + do + case "${PARENT_REPO}" in + buster-security) + if [ -z "${SECURITY_SUITES}" ] + then + SECURITY_SUITES="${PARENT_DIST}/updates" + else + SECURITY_SUITES="${SECURITY_SUITES} ${PARENT_DIST}/updates" + fi + ;; + + ${PARENT_DIST}-security) + if [ -z "${SECURITY_SUITES}" ] + then + SECURITY_SUITES="${PARENT_DIST}-security" + else + SECURITY_SUITES="${SECURITY_SUITES} ${PARENT_DIST}-security" + fi + ;; + + ${PARENT_DIST}-updates) + if [ -z "${SUITES}" ] + then + SUITES="${PARENT_DIST}-updates" + else + SUITES="${SUITES} ${PARENT_DIST}-updates" + fi + ;; + + ${PARENT_DIST}-backports) + if [ -z "${SUITES}" ] + then + SUITES="${PARENT_DIST}-backports" + else + SUITES="${SUITES} ${PARENT_DIST}-backports" + fi + ;; + + ${PARENT_DIST}-proposed-updates) + if [ -z "${SUITES}" ] + then + SUITES="${PARENT_DIST}/-proposed-updates" + else + SUITES="${SUITES} ${PARENT_DIST}-proposed-updates" + fi + ;; + + experimental) + if [ -z "${SUITES}" ] + then + SUITES="experimental" + else + SUITES="${SUITES} experimental" + fi + ;; + esac + done -deb ${PARENT_MIRROR} ${PARENT_DIST} ${PARENT_AREA} +cat > "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF +# /etc/apt/sources.list.d/debian.sources + +Types: deb +URIs: ${PARENT_MIRROR} +Suites: ${SUITES} +Components: ${PARENT_AREA} +PDiffs: no EOF +if [ -n "${SECURITY_SUITES}" ] +then + +cat >> "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF + +Types: deb +URIs: ${PARENT_MIRROR_SECURITY} +Suites: ${SECURITY_SUITES} +Components: ${PARENT_AREA} +PDiffs: no +EOF + +fi + case "${MODE}" in progress-linux) @@ -498,41 +576,89 @@ Configure_system () PARENT_AREA="$(echo ${PARENT_ARCHIVE_AREAS} | sed -e 's|,| |g')" PARENT_DIST="$(echo ${PARENT_DISTRIBUTION} | sed -e 's|-backports||')" -cat > "${DIRECTORY}/etc/apt/sources.list.d/debian.list" << EOF -# /etc/apt/sources.list.d/debian.list - -deb ${PARENT_MIRROR} ${PARENT_DIST} ${PARENT_AREA} -EOF - for PARENT_REPO in ${PARENT_ARCHIVES} do case "${PARENT_REPO}" in buster-security) - echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}/updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" + if [ -z "${SECURITY_SUITES}" ] + then + SECURITY_SUITES="${PARENT_DIST}/updates" + else + SECURITY_SUITES="${SECURITY_SUITES} ${PARENT_DIST}/updates" + fi ;; ${PARENT_DIST}-security) - echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}-security ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" + if [ -z "${SECURITY_SUITES}" ] + then + SECURITY_SUITES="${PARENT_DIST}-security" + else + SECURITY_SUITES="${SECURITY_SUITES} ${PARENT_DIST}-security" + fi ;; ${PARENT_DIST}-updates) - echo "deb ${PARENT_MIRROR} ${PARENT_DIST}-updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" + if [ -z "${SUITES}" ] + then + SUITES="${PARENT_DIST}-updates" + else + SUITES="${SUITES} ${PARENT_DIST}-updates" + fi ;; ${PARENT_DIST}-backports) - echo "deb ${PARENT_MIRROR} ${PARENT_DIST}-backports ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" + if [ -z "${SUITES}" ] + then + SUITES="${PARENT_DIST}-backports" + else + SUITES="${SUITES} ${PARENT_DIST}-backports" + fi ;; ${PARENT_DIST}-proposed-updates) - echo "deb ${PARENT_MIRROR} ${PARENT_DIST}-proposed-updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" + if [ -z "${SUITES}" ] + then + SUITES="${PARENT_DIST}/-proposed-updates" + else + SUITES="${SUITES} ${PARENT_DIST}-proposed-updates" + fi ;; experimental) - echo "deb ${PARENT_MIRROR} experimental ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list" + if [ -z "${SUITES}" ] + then + SUITES="experimental" + else + SUITES="${SUITES} experimental" + fi ;; esac done +cat > "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF +# /etc/apt/sources.list.d/debian.sources + +Types: deb +URIs: ${PARENT_MIRROR} +Suites: ${SUITES} +Components: ${PARENT_AREA} +PDiffs: no +EOF + +if [ -n "${SECURITY_SUITES}" ] +then + +cat >> "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF + +Types: deb +URIs: ${PARENT_MIRROR_SECURITY} +Suites: ${SECURITY_SUITES} +Components: ${PARENT_AREA} +PDiffs: no +EOF + +fi + case "${MODE}" in progress-linux) |