summaryrefslogtreecommitdiff
path: root/scripts/build/lb_binary_debian-installer
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-02-14 15:49:18 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:20:43 +0100
commita493644b2f9aaee031063e81b6c052ce4d6a525e (patch)
tree0a5501fefc5d787103436be090cdc83f49fe6f54 /scripts/build/lb_binary_debian-installer
parentebf1ea52381c1af715b8e77cf06d609a22bf4ce0 (diff)
downloadvyos-live-build-a493644b2f9aaee031063e81b6c052ce4d6a525e.tar.gz
vyos-live-build-a493644b2f9aaee031063e81b6c052ce4d6a525e.zip
Adding multi-repository support for debian-installer udebs at build-time.
Diffstat (limited to 'scripts/build/lb_binary_debian-installer')
-rwxr-xr-xscripts/build/lb_binary_debian-installer21
1 files changed, 19 insertions, 2 deletions
diff --git a/scripts/build/lb_binary_debian-installer b/scripts/build/lb_binary_debian-installer
index d2f966e14..914f9a057 100755
--- a/scripts/build/lb_binary_debian-installer
+++ b/scripts/build/lb_binary_debian-installer
@@ -262,7 +262,12 @@ then
;;
esac
else
- URL="${LB_PARENT_MIRROR_DEBIAN_INSTALLER}/dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/main/installer-${LB_ARCHITECTURES}/current/images/"
+ if [ "${LB_DISTRIBUTION}" = "true" ]
+ then
+ URL="${LB_MIRROR_DEBIAN_INSTALLER}/dists/${LB_DEBIAN_INSTALLER_DISTRIBUTION}/main/installer-${LB_ARCHITECTURES}/current/images/"
+ else
+ URL="${LB_PARENT_MIRROR_DEBIAN_INSTALLER}/dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/main/installer-${LB_ARCHITECTURES}/current/images/"
+ fi
fi
mkdir -p "${DESTDIR_DI}"
@@ -486,6 +491,7 @@ then
# Fetching release
Download_file binary/dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LB_ARCHITECTURES}/Release "${LB_PARENT_MIRROR_CHROOT}"/dists/"${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"/main/binary-"${LB_ARCHITECTURES}"/Release
+ # Udeb handling
mkdir binary.udeb
cd binary.udeb
@@ -493,9 +499,20 @@ then
Download_file Packages.gz "${LB_PARENT_MIRROR_CHROOT}"/dists/"${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"/main/debian-installer/binary-"${LB_ARCHITECTURES}"/Packages.gz
gunzip -c Packages.gz > Packages
+ if [ "${LB_DERIVATIVE}" = "true" ]
+ then
+ Download_file Packages.derivative.gz "${LB_MIRROR_CHROOT}"/dists/"${LB_DEBIAN_INSTALLER_DISTRIBUTION}"/main/debian-installer/binary-"${LB_ARCHITECTURES}"/Packages.gz
+ gunzip -c Packages.derivative.gz > Packages.derivative
+ fi
+
# Sorting udebs
UDEBS="$(awk '/Filename: / { print $2 }' Packages)"
+ if [ "${LB_DERIVATIVE}" = true ]
+ then
+ UDEBS="${UDEBS} $(awk '/Filename: / { print $2 }' Packages.derivative)"
+ fi
+
# Downloading udebs
for UDEB in ${UDEBS}
do
@@ -505,7 +522,7 @@ then
cp ../cache/packages_debian-installer.udeb/"$(basename ${UDEB})" ./
else
# Downloading udebs
- wget ${WGET_OPTIONS} "${LB_PARENT_MIRROR_CHROOT}"/${UDEB}
+ wget ${WGET_OPTIONS} "${LB_MIRROR_CHROOT}"/${UDEB} || wget ${WGET_OPTIONS} "${LB_PARENT_MIRROR_CHROOT}"/${UDEB}
fi
done