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

This commit is contained in:
Steve McIntyre 2015-09-07 16:14:25 +01:00
parent 18c49a1bfb
commit e41bbe25e3
2 changed files with 21 additions and 14 deletions

1
debian/changelog vendored
View File

@ -15,6 +15,7 @@ debian-cd (3.1.13-deb7u1) UNRELEASED; urgency=low
+ update-cd: if we're doing torrents, make sure we include update CD + update-cd: if we're doing torrents, make sure we include update CD
checksums in bt-$type too checksums in bt-$type too
+ generate_di+k_list: update mips* kernel packages + generate_di+k_list: update mips* kernel packages
+ update-cd: Check for file size on update CD/DVD generation
-- Steve McIntyre <93sam@debian.org> Mon, 17 June 2013 15:44:32 +0100 -- Steve McIntyre <93sam@debian.org> Mon, 17 June 2013 15:44:32 +0100

View File

@ -310,6 +310,11 @@ do
BACKOUT_FILE="" BACKOUT_FILE=""
fi 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 add_file $file
SIZE_USED=`du -sk $UPD/CD$CDNUM | awk '{print $1}'` SIZE_USED=`du -sk $UPD/CD$CDNUM | awk '{print $1}'`
@ -326,6 +331,7 @@ do
CDNUM=$(($CDNUM + 1)) CDNUM=$(($CDNUM + 1))
continue continue
fi fi
fi
done done
echo echo