[sword-devel] InstallMgr questions

Ben Morgan benpmorgan at gmail.com
Sun Apr 20 04:12:52 MST 2008

Hi All,

I've been looking at installmgr lately, and have a few questions:

Could there be a consistent ftp site structure?
In case you don't know, the way InstallMgr works is thus:
The location to go use is specified by the install source. It will give a
directory to look in.
1) Retrieve the mods.d.tar.gz from the folder specified by the install
source on the server
2) Open it up, and see what files are inside by looking at the different
<modulename>.conf file
3) When a module needs to be installed, look in the <modulename>.conf file
to find the relative path to the module files on the server
4) Copy all the files from the server into the InstallMgr directory
5) Copy from the InstallMgr directory to the destination directory

Most Bible downloads will have at 4 files I think, and dictionaries 2, which
will take a while to download.
What I really don't like about this approach is the fact that there is a zip
of all the files needed available.
This will be much quicker to download, both due to the smaller file size,
and the fact fewer connections need to be made.

However, I have looked at the way to get at the zip file, and every site is
a special case:
Relative to the install source path,
bible.org keeps them under packages/rawzip
ftp.crosswire.org keeps them under ../packages/rawzip for published, and
../betapackages/rawzip for beta ones
ftp.kleinpaste.org keeps them under zip/

Keeping these consistent would make it much easier for InstallMgr to
download a .zip if possible.
I think we should make a decision on which is preferred, and put it on the
While it may be too late to change existing ones, I don't want to see even
more different styles.

Also, on the more technical side, while translating to python I found some
Should this file descriptor be closed??? As far as I can see, this will leak
a descriptor every remote refresh.
I think it should do something like this:
  int desc = FileMgr::createPathAndFile(target+"/globals.conf");
  if(desc >= 1)

installmgr.cpp:279    SWMgr mgr(sourceDir.c_str());
Should this be SWMgr mgr(sourceDir.c_str(), true, 0, false, false)?
Without this, it will download it into the home directory, instead of the
correct one.
This will mean it then tries to copy from itself onto itself, and presumably
delete itself after that.
Also installmgr:391         SWMgr newDest(destMgr->prefixPath);

At this stage, it looks like BPBible 0.3 will have InstallMgr support, as
the translation of installmgr to python code seems to have got rid of the
problems I've had with the c++ version. Some things like the GUI still have
to be worked out, though.

Sorry this email is so long :)

God Bless,
The Lord is not slow to fulfill his promise as some count slowness,
but is patient toward you, not wishing that any should perish,
but that all should reach repentance.
2 Peter 3:9 (ESV)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.crosswire.org/pipermail/sword-devel/attachments/20080420/c3363f82/attachment.html 

More information about the sword-devel mailing list