Tiny Core Linux
Tiny Core Base => Micro Core => Topic started by: Greg Erskine on April 10, 2015, 07:39:45 PM
-
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. :)
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
regards
Greg
-
Would you like to provide a patch?
-
Would you like to provide a patch?
hi curaga,
Here is my attempt at a patch.
$ 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
Tested on:
CLI - 3.18.9-piCore+
GUI - 3.8.13-tinycore
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
regards
Greg
-
Applied, thanks. In the future please post patches to a downloadable service, like pastebin or patches.tinycorelinux.net - copy-pasting can break them.