summaryrefslogtreecommitdiffstats
path: root/share/build-scripts/debconf.d/0003-debconf
diff options
context:
space:
mode:
Diffstat (limited to 'share/build-scripts/debconf.d/0003-debconf')
-rwxr-xr-xshare/build-scripts/debconf.d/0003-debconf34
1 files changed, 25 insertions, 9 deletions
diff --git a/share/build-scripts/debconf.d/0003-debconf b/share/build-scripts/debconf.d/0003-debconf
index e12e25e..bd171c1 100755
--- a/share/build-scripts/debconf.d/0003-debconf
+++ b/share/build-scripts/debconf.d/0003-debconf
@@ -664,12 +664,16 @@ Local_archives ()
do
mkdir -p "${DEBCONF_TMPDIR}/apt"
- REPOSITORY="${RET#deb }"
+ REPOSITORY="$(echo "${RET}" | sed -e 's|^deb ||')"
- LIST="archive${NUMBER}.list"
+ MIRROR="$(echo ${REPOSITORY} | cut -d' ' -f1)"
+ SUITES="$(echo ${REPOSITORY} | cut -d' ' -f2)"
+ AREAS="$(echo ${REPOSITORY} | cut -d' ' -f3-)"
+
+ LIST="archive${NUMBER}.sources"
if db_get container/archive${NUMBER}/list
then
- LIST="$(basename ${RET} .list).list"
+ LIST="$(basename ${RET} .sources).sources"
fi
COMMENT=""
@@ -677,14 +681,18 @@ Local_archives ()
then
COMMENT="${RET}"
- echo "# ${COMMENT}" > "${DEBCONF_TMPDIR}/apt/${LIST}"
- fi
+cat > "${DEBCONF_TMPDIR}/apt/${LIST}" << EOF
+# ${COMMENT}
- echo "deb ${REPOSITORY}" >> "${DEBCONF_TMPDIR}/apt/${LIST}"
+EOF
+
+ fi
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
KEY=""
@@ -692,9 +700,17 @@ Local_archives ()
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
+cat > "${DEBCONF_TMPDIR}/apt/${LIST}" << EOF
+Types: deb
+URIs: ${MIRROR}
+Suites: ${SUITES}
+Components: ${AREAS}
+PDiffs: no
+EOF
+
PREFERENCES_PACKAGE=""
PREFERENCES_PIN=""
PREFERENCES_PIN_PRIORITY=""
@@ -715,7 +731,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}