Tiny Core Base > Micro Core
tce-size should also report size of extensions with no dependencies
(1/1)
Greg Erskine:
Hi,
I just noticed that tce-size will not display the size of an extension if it doesn't have any dependencies.
The script does all the hard stuff but misses the simple case.
I think the script exits early when it cannot download "$app".tree and a .tree file only exists if the extension has dependencies.
For my purposes, I can just grab the extension size from sizelist, but it would have been nice to use a standard script especially when it handles dependencies so nicely. :)
--- Code: ---tc@piCorePlayer3:/usr/bin$ tce-size nano.tcz
file.tcz 266240, 0.25 MB
nano.tcz 139264, 0.13 MB
ncurses.tcz 192512, 0.18 MB
Total size (bytes) 598016, 0.57 MB
+ Indicates need to download 0, 0.00 MB
tc@piCorePlayer3:/usr/bin$ tce-size file.tcz
wget: server returned error: HTTP/1.1 404 Not Found
tc@piCorePlayer3:/usr/bin$ tce-size ncurses.tcz
wget: server returned error: HTTP/1.1 404 Not Found
--- End code ---
regards
Greg
curaga:
Would you like to provide a patch?
Greg Erskine:
--- Quote from: curaga on April 11, 2015, 02:06:06 AM ---Would you like to provide a patch?
--- End quote ---
hi curaga,
Here is my attempt at a patch.
--- Code: ---$ diff tce-size-orig tce-size
--- tce-size-orig
+++ tce-size
@@ -59,7 +59,7 @@
touch sizelist
fi
fi
- tce-fetch.sh "$app".tree || exit 1
+ tce-fetch.sh "$app".tree >/dev/null 2>&1 || echo "$app" > "$app".tree
totalsize_needed=0
totalsize_installed=0
--- End code ---
Tested on:
CLI - 3.18.9-piCore+
GUI - 3.8.13-tinycore
--- Code: ---tc@piCorePlayer3:/usr/bin$ uname -r
3.18.9-piCore+
tc@piCorePlayer3:/usr/bin$ tce-size nano.tcz
file.tcz 266240, 0.25 MB
nano.tcz 102400, 0.10 MB
ncurses.tcz 192512, 0.18 MB
Total size (bytes) 561152, 0.54 MB
+ Indicates need to download 0, 0.00 MB
tc@piCorePlayer3:/usr/bin$ tce-size file.tcz
file.tcz 266240, 0.25 MB
Total size (bytes) 266240, 0.25 MB
+ Indicates need to download 0, 0.00 MB
tc@piCorePlayer3:/usr/bin$ tce-size ncurses.tcz
ncurses.tcz 192512, 0.18 MB
Total size (bytes) 192512, 0.18 MB
+ Indicates need to download 0, 0.00 MB
--- End code ---
regards
Greg
curaga:
Applied, thanks. In the future please post patches to a downloadable service, like pastebin or patches.tinycorelinux.net - copy-pasting can break them.
Navigation
[0] Message Index
Go to full version