[sword-devel] *.conf qualifier, InstallSize
karl at kleinpaste.org
Sat Dec 29 14:43:13 MST 2007
Chris Little <chrislit at crosswire.org> writes:
> Personally, I have no interest in updating all of the existing .confs to
> add the install size, and have no desire to do it on an ongoing basis as
> part of the release process. If we can add it as an automated process,
> that's fine/great.
First-round fix-up, just cut-n-paste this after cd'ing to $SWORD_PATH:
for mod in mods.d/*.conf ; do
echo InstallSize=1 >> $mod
data="`grep ^DataPath= \"$mod\" | sed -e 's;DataPath=./;;' -e 's;[a-z]\+$;;'`"
files="`find \"$data\" -type f`"
installsize="`cat $files | wc -c`"
sed -i -e "s/^InstallSize=.*$/InstallSize=$installsize/" "$mod"
Take out the echo from the core of that to apply it as-is to any update.
This is a minor simplification of how I manage my own repos.
> Adding InstallSize doesn't really give the whole picture when it comes
> to modules like the Dore woodcuts, anyway. They take much longer to
> download than their relative size would suggest because of the many
> files they contain, rather than their size alone.
70M coming over a Comcast link whose uplink is throttled to 800Kbps...
Basic operational analysis says the fact that there are 200+ files is
utterly inconsequential -- the trivial inter-file delay simply vanishes
into overall link transfer time. To make inter-file delay worth
noticing, end-to-end link speed would have to approach 10Mbps, and even
Crosswire hasn't got that. I do in-house installs on my machines using
my own repos, where I have 100Mbps wired, and I know how this works.
I've already updated every module in my repositories and made the
changes to GnomeSword needed to support it. I'll be committing them
It all works fine.
More information about the sword-devel