123
# Configure third-party repositories
124
if [ -n "${LH_REPOSITORIES}" ]
126
for REPOSITORY in ${LH_REPOSITORIES}
128
for PLACE in config/repositories "${LH_BASE}/repositories"
130
# Prefer repositories from the config tree
131
# over the global ones.
132
if ! ls "${PLACE}/${REPOSITORY}"* > /dev/null 2>&1
137
# Adding sources.list entries (chroot)
138
if [ -e "${PLACE}/${REPOSITORY}.chroot" ]
140
sed -e "s|@DISTRIBUTION@|${LH_DISTRIBUTION}|g" \
141
-e "s|@ARCHIVE_AREAS@|${LH_ARCHIVE_AREAS}|g" \
142
"${PLACE}/${REPOSITORY}.chroot" > \
143
"chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
144
elif [ -e "${PLACE}/${REPOSITORY}" ]
146
sed -e "s|@DISTRIBUTION@|${LH_DISTRIBUTION}|g" \
147
-e "s|@ARCHIVE_AREAS@|${LH_ARCHIVE_AREAS}|g" \
148
"${PLACE}/${REPOSITORY}" > \
149
"chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
152
if [ "${LH_APT_SECURE}" != false ]
154
# Adding archive signing keys (chroot)
155
if [ -e "${PLACE}/${REPOSITORY}.chroot.gpg" ]
157
cat "${PLACE}/${REPOSITORY}.chroot.gpg" | Chroot chroot "apt-key add -"
158
elif [ -e "${PLACE}/${REPOSITORY}.gpg" ]
160
cat "${PLACE}/${REPOSITORY}.gpg" | Chroot chroot "apt-key add -"
123
167
# Configure local package repository
124
168
if Find_files config/chroot_local-packages/*.deb
500
# Configure third-party repositories
501
if [ -n "${LH_REPOSITORIES}" ]
503
for REPOSITORY in ${LH_REPOSITORIES}
505
# Removing sources.list entries (chroot)
506
rm -f "chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
508
for PLACE in config/repositories "${LH_BASE}/repositories"
510
# Prefer repositories from the config tree
511
# over the global ones.
512
if ! ls "${PLACE}/${REPOSITORY}"* > /dev/null 2>&1
517
# Adding sources.list entries (binary)
518
if [ -e "${PLACE}/${REPOSITORY}.binary" ]
520
sed -e "s|@DISTRIBUTION@|${LH_DISTRIBUTION}|g" \
521
-e "s|@ARCHIVE_AREAS@|${LH_ARCHIVE_AREAS}|g" \
522
"${PLACE}/${REPOSITORY}.binary" > \
523
"chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
524
elif [ -e "${PLACE}/${REPOSITORY}" ]
526
sed -e "s|@DISTRIBUTION@|${LH_DISTRIBUTION}|g" \
527
-e "s|@ARCHIVE_AREAS@|${LH_ARCHIVE_AREAS}|g" \
528
"${PLACE}/${REPOSITORY}" > \
529
"chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
532
if [ "${LH_APT_SECURE}" != false ]
534
# Adding archive signing keys (binary)
535
if [ -e "${PLACE}/${REPOSITORY}.binary.gpg" ]
537
cat "${PLACE}/${REPOSITORY}.binary.gpg" | Chroot chroot "apt-key add -"
538
elif [ -e "${PLACE}/${REPOSITORY}.gpg" ]
540
cat "${PLACE}/${REPOSITORY}.gpg" | Chroot chroot "apt-key add -"
456
547
# Check local sources.list
457
548
if Find_files config/chroot_sources/*.binary