diff options
author | Katharina Drexel <katharina.drexel@bfh.ch> | 2021-04-12 12:35:24 +0000 |
---|---|---|
committer | Katharina Drexel <katharina.drexel@bfh.ch> | 2021-04-13 07:56:58 +0000 |
commit | 6601ac8b593941507a31cd608cc846c261a3b3cd (patch) | |
tree | 944c11b52389fcb507a5095bc673329cefe11ce0 | |
parent | More speaking error messages if no bootstrap program installed. (diff) | |
download | compute-tools-6601ac8b593941507a31cd608cc846c261a3b3cd.tar.xz compute-tools-6601ac8b593941507a31cd608cc846c261a3b3cd.zip |
Replace debian.list by debian.sources.
Signed-off-by: Katharina Drexel <katharina.drexel@bfh.ch>
-rwxr-xr-x | share/scripts/debconf | 91 |
1 files changed, 78 insertions, 13 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf index 451299a..13209ca 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -424,10 +424,19 @@ Configure_apt () 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 + if [ -f "${DIRECTORY}"/etc/apt/sources.list.d/[[:digit:]]*debian.sources ] + then + rm -f "${DIRECTORY}"/etc/apt/sources.list.d/[[:digit:]]*debian.sources + fi + +cat > "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF +# /etc/apt/sources.list.d/debian.sources -deb ${PARENT_MIRROR} ${PARENT_DIST} ${PARENT_AREA} +Types: deb +URIs: ${PARENT_MIRROR} +Suites: ${PARENT_DIST} +Components: ${PARENT_AREA} +PDiffs: no EOF case "${MODE}" in @@ -498,41 +507,97 @@ 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 +cat > "${DIRECTORY}/etc/apt/sources.list.d/debian.sources" << EOF +# /etc/apt/sources.list.d/debian.sources -deb ${PARENT_MIRROR} ${PARENT_DIST} ${PARENT_AREA} +Types: deb +URIs: ${PARENT_MIRROR} +Suites: ${PARENT_DIST} +Components: ${PARENT_AREA} +PDiffs: no 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" + bullseye-security) + 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) |