Fix "--debian-installer cdrom" and its interaction with binary_package-lists
apt-ftparchive is not able to differentiate between .deb and .udeb so we have to install them in different pool directories so that we can regenerate the Packages files without having the .udeb show up unexpectedly. Since binary_package-lists can overwrite the Packages files generated in installer_debian-installer we have to ensure that it also updates the Release file created formerly. Ideally we should find a way to avoid the duplication of this logic. Gbp-Dch: Full
This commit is contained in:
parent
cba349e5d0
commit
30b9a391ac
|
@ -129,6 +129,15 @@ then
|
|||
mv "${FILE}" binary/${POOL}/${SECTION}/"${LETTER}"/"${SOURCE}"
|
||||
done
|
||||
|
||||
if [ -e chroot/etc/os-release ]
|
||||
then
|
||||
_VERSION="$(. chroot/etc/os-release && echo ${VERSION_ID})"
|
||||
fi
|
||||
|
||||
if [ -n "${_VERSION}" ]; then
|
||||
_LB_APT_VERSION_OPT='-o APT::FTPArchive::Release::Version="'"${_VERSION}"'"'
|
||||
fi
|
||||
|
||||
cd binary
|
||||
|
||||
for SECTION in ${POOL}/*
|
||||
|
@ -144,6 +153,21 @@ then
|
|||
gzip -9 -c ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURES}/Packages > ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURES}/Packages.gz
|
||||
done
|
||||
|
||||
if [ -d dists/${LB_PARENT_DISTRIBUTION_BINARY} ]; then
|
||||
apt-ftparchive \
|
||||
-o APT::FTPArchive::Release::Origin="Debian" \
|
||||
-o APT::FTPArchive::Release::Label="Debian" \
|
||||
-o APT::FTPArchive::Release::Suite="${LB_PARENT_DISTRIBUTION_BINARY}" \
|
||||
${_LB_APT_VERSION_OPT} \
|
||||
-o APT::FTPArchive::Release::Codename="${LB_PARENT_DISTRIBUTION_BINARY}" \
|
||||
-o APT::FTPArchive::Release::Date="$(date -R)" \
|
||||
-o APT::FTPArchive::Release::Architectures="${LB_ARCHITECTURES}" \
|
||||
-o APT::FTPArchive::Release::Components="${LB_PARENT_ARCHIVE_AREAS}" \
|
||||
-o APT::FTPArchive::Release::Description="Last updated: $(date -R)" \
|
||||
release dists/${LB_PARENT_DISTRIBUTION_BINARY} \
|
||||
> dists/${LB_PARENT_DISTRIBUTION_BINARY}/Release
|
||||
fi
|
||||
|
||||
cd "${OLDPWD}"
|
||||
|
||||
rm -f chroot/bin/Packages
|
||||
|
|
|
@ -514,7 +514,7 @@ then
|
|||
fi
|
||||
|
||||
# Udeb handling
|
||||
mkdir binary.udeb
|
||||
mkdir -p binary.udeb/pool-udeb/main
|
||||
cd binary.udeb
|
||||
|
||||
# Downloading udeb indices
|
||||
|
@ -570,7 +570,7 @@ then
|
|||
do
|
||||
if [ -e "${FILE}" ]
|
||||
then
|
||||
Install_file "${FILE}" "pool"
|
||||
Install_file "${FILE}" "pool-udeb"
|
||||
|
||||
# Prefer local udebs over downloaded udebs
|
||||
rm -f "$(basename ${FILE} | awk -F_ '{ print $1 }')"_*.udeb
|
||||
|
@ -584,7 +584,7 @@ then
|
|||
do
|
||||
if [ -e "${FILE}" ]
|
||||
then
|
||||
Install_file "${FILE}" "pool"
|
||||
Install_file "${FILE}" "pool-udeb"
|
||||
|
||||
# Prefer local udebs over downloaded udebs
|
||||
rm -f "$(basename ${FILE} | awk -F_ '{ print $1 }')"_*.udeb
|
||||
|
@ -629,8 +629,8 @@ then
|
|||
do
|
||||
if [ -f "$(basename ${UDEB})" ]
|
||||
then
|
||||
mkdir -p $(dirname ${UDEB})
|
||||
mv "$(basename ${UDEB})" "$(dirname ${UDEB})"
|
||||
Install_file "$(basename ${UDEB})" "pool-udeb"
|
||||
rm "$(basename ${UDEB})"
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -639,7 +639,7 @@ then
|
|||
cd "${OLDPWD}"
|
||||
|
||||
mv binary.udeb chroot/root
|
||||
echo "cd /root/binary.udeb && apt-ftparchive packages pool/main > dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/main/debian-installer/binary-${LB_ARCHITECTURES}/Packages" > chroot/binary.sh
|
||||
echo "cd /root/binary.udeb && apt-ftparchive packages pool-udeb/main > dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/main/debian-installer/binary-${LB_ARCHITECTURES}/Packages" > chroot/binary.sh
|
||||
Chroot chroot "sh binary.sh"
|
||||
rm -f chroot/binary.sh
|
||||
mv chroot/root/binary.udeb ./
|
||||
|
|
Loading…
Reference in New Issue