summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-10-02 15:34:06 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-10-02 20:46:56 +0000
commit588e51626b4016ea3f5fee76992dbad8013ba4f5 (patch)
treeab96b30bee16595f45f9c4c57fa44ea68d89665b /share
parentUsing debian.sources instead of debian.list in debconf build scripts. (diff)
downloadcompute-tools-tmp-list-to-sources.tar.xz
compute-tools-tmp-list-to-sources.zip
Using repo.sources instead of repo.list for local repositories in debconf build scripts.tmp-list-to-sources
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xshare/build-scripts/debconf4
-rwxr-xr-xshare/build-scripts/debconf.d/0003-debconf28
2 files changed, 23 insertions, 9 deletions
diff --git a/share/build-scripts/debconf b/share/build-scripts/debconf
index 981ea99..b3b4577 100755
--- a/share/build-scripts/debconf
+++ b/share/build-scripts/debconf
@@ -585,9 +585,9 @@ EOF
fi
# Add local archives configured from preseed file
- if ls "${DEBCONF_TMPDIR}/apt"/*.list > /dev/null 2>&1
+ if ls "${DEBCONF_TMPDIR}/apt"/*.sources > /dev/null 2>&1
then
- cp "${DEBCONF_TMPDIR}/apt"/*.list "${DIRECTORY}/etc/apt/sources.list.d"
+ cp "${DEBCONF_TMPDIR}/apt"/*.sources "${DIRECTORY}/etc/apt/sources.list.d"
if ls "${DEBCONF_TMPDIR}/apt"/*.key > /dev/null 2>&1
then
diff --git a/share/build-scripts/debconf.d/0003-debconf b/share/build-scripts/debconf.d/0003-debconf
index edd3ea7..c3076ab 100755
--- a/share/build-scripts/debconf.d/0003-debconf
+++ b/share/build-scripts/debconf.d/0003-debconf
@@ -609,10 +609,10 @@ Local_archives ()
REPOSITORY="${RET#deb }"
- LIST="archive${NUMBER}.list"
+ LIST="archive${NUMBER}.sources"
if db_get container/archive${NUMBER}/list
then
- LIST="$(basename ${RET} .list).list"
+ LIST="$(basename ${RET} .sources).sources"
fi
COMMENT=""
@@ -621,21 +621,35 @@ Local_archives ()
COMMENT="${RET}"
echo "# ${COMMENT}" > "${DEBCONF_TMPDIR}/apt/${LIST}"
+ else
+ echo "# /etc/apt/sources.list.d/${LIST}" > "${DEBCONF_TMPDIR}/apt/${LIST}"
fi
- echo "deb ${REPOSITORY}" >> "${DEBCONF_TMPDIR}/apt/${LIST}"
-
if db_get container/archive${NUMBER}/source && [ "$RET" = true ]
then
- echo "deb-src ${REPOSITORY}" >> "${DEBCONF_TMPDIR}/apt/${LIST}"
+ TYPES="deb deb-src"
+ else
+ TYPES="deb"
fi
+ URI="$(echo "${REPOSITORY}" | cut -d' ' -f1)"
+ SUITE="$(echo "${REPOSITORY}" | cut -d' ' -f2)"
+ COMPONENTS="$(echo "${REPOSITORY}" | cut -d' ' -f3-)"
+
+cat >> "${DEBCONF_TMPDIR}/apt/${LIST}" << EOF
+
+Types: ${TYPES}
+URIs: ${URI}
+Suites: ${SUITE}
+Components: ${COMPONENTS}
+EOF
+
KEY=""
if db_get container/archive${NUMBER}/key
then
KEY="${RET}"
- wget -q "${KEY}" -O "${DEBCONF_TMPDIR}/apt/$(basename ${LIST} .list).key"
+ wget -q "${KEY}" -O "${DEBCONF_TMPDIR}/apt/$(basename ${LIST} .sources).key"
fi
PREFERENCES_PACKAGE=""
@@ -658,7 +672,7 @@ Local_archives ()
if [ -n "${PREFERENCES_PACKAGE}" ] || [ -n "${PREFERENCES_PIN}" ] || [ -n "${PREFERENCES_PIN_PRIORITY}" ]
then
-cat > "${DEBCONF_TMPDIR}/apt/$(basename ${LIST} .list).pref" << EOF
+cat > "${DEBCONF_TMPDIR}/apt/$(basename ${LIST} .sources).pref" << EOF
Package: ${PREFERENCES_PACKAGE}
Pin: ${PREFERENCES_PIN}
Pin-Priority: ${PREFERENCES_PIN_PRIORITY}