summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-01-26 13:59:24 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:40 +0100
commita0d12dbf00eb37f26ec0bcf3da0260c182bf862d (patch)
treeec3515d96c0f9dbc7b130763bb7ddf4034ef538a /helpers
parent1a4ff3e443d5034ae8efadb0407904f1f51a519c (diff)
downloadlive-build-a0d12dbf00eb37f26ec0bcf3da0260c182bf862d.zip
live-build-a0d12dbf00eb37f26ec0bcf3da0260c182bf862d.tar.gz
Actually doing apt-ftparchive operations in chroot as it was originally intended to be, otherwise apt-utils would be need to be a depends of live-helper.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary_debian-installer51
1 files changed, 35 insertions, 16 deletions
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index bbe35fd..83c1681 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -495,10 +495,13 @@ then
# Generating deb indices
mkdir -p binary/dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}
- cd binary
- apt-ftparchive packages pool/main > dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages
- gzip -9 -c dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages > dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages.gz
- cd "${OLDPWD}"
+ mv binary chroot/root
+ echo "cd /root/binary && apt-ftparchive packages pool/main > dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages" > chroot/binary.sh
+ Chroot chroot "sh binary.sh"
+ rm -f chroot/binary.sh
+ mv chroot/root/binary ./
+
+ gzip -9 -c binary/dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages > binary/dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages.gz
# Fetching release
Download_file binary/dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Release "${LH_MIRROR_CHROOT}"/dists/"${LH_DEBIAN_INSTALLER_DISTRIBUTION}"/main/binary-"${LH_ARCHITECTURE}"/Release
@@ -597,7 +600,15 @@ then
# Creating udeb indices
mkdir -p dists/"${LH_DEBIAN_INSTALLER_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"
- apt-ftparchive packages pool/main > dists/"${LH_DEBIAN_INSTALLER_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"/Packages
+ cd "${OLDPWD}"
+
+ mv binary.udeb chroot/root
+ echo "cd /root/binary.udeb && apt-ftparchive packages pool/main > dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/debian-installer/binary-${LH_ARCHITECTURE}/Packages" > chroot/binary.sh
+ Chroot chroot "sh binary.sh"
+ rm -f chroot/binary.sh
+ mv chroot/root/binary.udeb ./
+
+ cd binary.udeb
gzip -9 -c dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/debian-installer/binary-${LH_ARCHITECTURE}/Packages > dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/debian-installer/binary-${LH_ARCHITECTURE}/Packages.gz
rm -f Packages* exclude
@@ -608,17 +619,25 @@ then
rm -rf binary.deb
# Generating release file
- apt-ftparchive \
- -o APT::FTPArchive::Release::Origin="Debian" \
- -o APT::FTPArchive::Release::Label="Debian" \
- -o APT::FTPArchive::Release::Suite="${LH_DEBIAN_INSTALLER_DISTRIBUTION}" \
- -o APT::FTPArchive::Release::Version="4.0" \
- -o APT::FTPArchive::Release::Codename="${LH_DEBIAN_INSTALLER_DISTRIBUTION}" \
- -o APT::FTPArchive::Release::Date="$(date -R)" \
- -o APT::FTPArchive::Release::Architectures="${LH_ARCHITECTURE}" \
- -o APT::FTPArchive::Release::Components="main" \
- -o APT::FTPArchive::Release::Description="Last updated: $(date -R)" \
- release binary/dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION} > binary/dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/Release
+ mv binary chroot/root
+
+cat > chroot/binary.sh << EOF
+cd /root/binary && apt-ftparchive \
+ -o APT::FTPArchive::Release::Origin="Debian" \
+ -o APT::FTPArchive::Release::Label="Debian" \
+ -o APT::FTPArchive::Release::Suite="${LH_DEBIAN_INSTALLER_DISTRIBUTION}" \
+ -o APT::FTPArchive::Release::Version="4.0" \
+ -o APT::FTPArchive::Release::Codename="${LH_DEBIAN_INSTALLER_DISTRIBUTION}" \
+ -o APT::FTPArchive::Release::Date="$(date -R)" \
+ -o APT::FTPArchive::Release::Architectures="${LH_ARCHITECTURE}" \
+ -o APT::FTPArchive::Release::Components="main" \
+ -o APT::FTPArchive::Release::Description="Last updated: $(date -R)" \
+ release dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION} > dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/Release
+EOF
+
+ Chroot chroot "sh binary.sh"
+ rm -f chroot/binary.sh
+ mv chroot/root/binary ./
# Creating dist symlinks
for DISTRIBUTION in frozen stable testing unstable