Making workaround for apt-get source actually working in backports-included-but-not-enabled scenarios.

This commit is contained in:
Daniel Baumann 2013-09-18 08:38:24 +02:00
parent 4a5d67c5b8
commit 1cdc2fc5b4
1 changed files with 14 additions and 2 deletions

View File

@ -116,15 +116,19 @@ case "${LB_MODE}" in
;;
*)
if grep -qs "-backports" chroot/etc/apt/sources.list.d/progress-linux.list
if grep -qs "${LB_DISTRIBUTION}-backports" chroot/etc/apt/sources.list.d/progress-linux.list
then
cp chroot/etc/apt/sources.list.d/progress-linux.list chroot/etc/apt/sources.list.d/progress-linux.list.orig
while read _LINE
do
if echo "${_LINE}" | grep -qs ${LB_DISTRIBUTION}-backports
then
sed -i -e "s|${_LINE}|#${_LINE}|" chroot/etc/apt/sources.list.d/progress-linux.list
fi
done < chroot/etc/apt/sources.list.d/progress-linux.list
done < chroot/etc/apt/sources.list.d/progress-linux.list.orig
Apt chroot update
fi
;;
esac
@ -183,5 +187,13 @@ do
mv chroot/"${SOURCE}"_* source/debian/"${LETTER}"/"${SOURCE}"
done
# Reverting apt sources again
if [ -e chroot/etc/apt/sources.list.d/progress-linux.list.orig ]
then
mv chroot/etc/apt/sources.list.d/progress-linux.list.orig chroot/etc/apt/sources.list.d/progress-linux.list
Apt chroot update
fi
# Creating stage file
Create_stagefile .build/source_debian