[sword-devel] InstallMgr questions
Troy A. Griffitts
scribe at crosswire.org
Sun Apr 20 12:31:30 MST 2008
Ben,
The ZIP packages are in a number of formats for different platforms
(MacOSX, Windows, Raw, etc.) They are not to intended to be used by
InstallMgr. We have discussed adding to InstallMgr support for .zip
downloads of modules, but the discussed approach would rely on the ftp
server supporting the fairly common feature that GET <directory>.zip
will attempt to zip up a <directory> on the server side and send it to
the client.
I appreciate your exercise to 'translate' installmgr to python. I hope
it has been useful to understanding the code and might reveal a bug in
the C++ code that has been giving you troubles, but I would advise
against using your translation in your app. With all apps using the
engine code, we can modify and add features to installmgr such that
every frontend can take advantage of changes-- and we do have a few in
the works, including a registry of repositories installmgr can query to
populate its remote source list.
My apologies for not attending to your issue with installmgr. I have
about 2 more weeks to finish up school and the end of a semester is
always crammed because I am in the running to take the prize for World's
Best Procrastinator.
Hope to jump headlong into SWORD work to get 1.5.11 out the door, a new
ISO, then rest for a couple weeks and then FINALLY enjoy programming for
SWORD again. There are so many things to tackle that have been on the
back burner, and I'm excited to done with my distractions!
-Troy. (Does Python recognize my tab as subjugating my signature to
this message? I think logically, it should be the other way round.)
Ben Morgan wrote:
> 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 <http://bible.org> keeps them under packages/rawzip
> ftp.crosswire.org <ftp://ftp.crosswire.org> keeps them under
> ../packages/rawzip for published, and ../betapackages/rawzip for beta ones
> ftp.kleinpaste.org <ftp://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 wiki.
> 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 problems:
> installmgr.cpp:462
> FileMgr::createPathAndFile(target+"/globals.conf");
> 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)
> ::close(desc);
>
> 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,
> Ben
> -------------------------------------------------------------------------------------------
> 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)
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
More information about the sword-devel
mailing list