Backport: Check for file size on update CD/DVD generation

This commit is contained in:
Steve McIntyre 2015-09-07 15:55:42 +01:00
parent f2a1b5d4d3
commit 71738b0cba
2 changed files with 21 additions and 14 deletions

1
debian/changelog vendored
View File

@ -11,6 +11,7 @@ debian-cd (3.1.17-jessie) UNRELEASED; urgency=medium
+ tools/start_new_disc: shorten VOLID when possible
+ tools/boot/jessie/boot-arm: Add kernels and other bits to
armel/armhf images
+ Check for file size on update CD/DVD generation
-- Steve McIntyre <93sam@debian.org> Mon, 20 Apr 2015 12:36:57 +0100

View File

@ -310,6 +310,11 @@ do
BACKOUT_FILE=""
fi
size=$(stat -c %s $MIRROR/$file)
size_kib=$(($size / 1024))
if [ $size_kib -gt $CDSIZE ] ; then
echo "Ignoring file $file - it won't fit!"
else
add_file $file
SIZE_USED=`du -sk $UPD/CD$CDNUM | awk '{print $1}'`
@ -326,6 +331,7 @@ do
CDNUM=$(($CDNUM + 1))
continue
fi
fi
done
echo