For example when trying to install XFCE-442a.pet which is 21.7MB in size on my install with a 256MB pup_save file and 221.2M free I would get the not enough block free message.
When checking what stat returns I get the following for these 2 commands.
Code: Select all
sh-3.00# stat --filesystem --format=%f /
51100
sh-3.00# stat --format=%b XFCE-442a.tar.gz
44592
Code: Select all
sh-3.00# stat --filesystem --format=%s /
4096
sh-3.00# stat --format=%B XFCE-442a.tar.gz
512
51100 * 4096 = 209,305,600 -- free space in bytes
44592 * 512 * 2 = 45,662,208 -- required space in bytes
So my solution was to change
Code: Select all
EXPFREEB=`stat --filesystem --format=%f /` * `stat --filesystem --format=%s /`#no. free blocks.
EXPFILEB=`stat --format=%b $APKGNAMEEX` #no. blocks.
EXPNEEDB=`expr $EXPFILEB \* 2` #bz2 can expand up to x3, need twice temp space. v3.01 changed 5 to 3. v3.92 changed to 2.
if [ $EXPNEEDB -gt $EXPFREEB ];then
Code: Select all
EXPFREEB=`stat --filesystem --format=%f /` #no. free blocks.
EXPFREEBS=`stat --filesystem --format=%s /` #fee block size
EXPFREEBY=`expr $EXPFREEB \* $EXPFREEBS` #free bytes
EXPFILEB=`stat --format=%b $APKGNAMEEX` #no. blocks.
EXPFILEBS=`stat --format=%B $APKGNAMEEX` #block size
EXPFILEBY=`expr $EXPFILEB \* $EXPFILEBS` #bytes
EXPNEEDB=`expr $EXPFILEBY \* 2` #bz2 can expand up to x3, need twice temp space. v3.01 changed 5 to 3. v3.92 changed to 2.
if [ $EXPNEEDB -gt $EXPFREEBY ];then
Bob