Re: Question regarding InstallMgr

Greg Hellings <[email protected]>
Newsgroups gmane.comp.literature.sword.devel
Message-ID <CAHxvOV+1PKM6nkGm9xcT8a188+SrrK9hZVVOeUfKPL71qf=7ag@mail.gmail.com>
I believe you will need to refresh that source before you call the install
method. It's trying to look up the config file for that module and isn't
finding it. Those get downloaded and cached by the Installmgr class when it
refreshes a source.

--Greg

On Thu, Dec 8, 2022, 14:51 P Mosier <[email protected]> wrote:

> Hello,
>
> I am trying to figure out what the appropriate steps to take are for
> programmatically installing a module through FTP.  Looking through the
> backend codebase, it seems like there are some configuration settings
> that have to be initialized in SWMgr order for InstallMgr::installModule
> to work.  However, tracking this down has eluded me as InstallMgr never
> seems to be set up and called the same way twice.
>
> I have this as a simple example:
>
>      sword::SWMgr swrd;
>      sword::InstallSource is("FTP");
>      is.source = "ftp.crosswire.org";
>      is.directory = "/pub/sword";
>
>      sword::InstallMgr im;
>      im.installModule(&swrd, 0, "KJVA", &is);
>
> The call to installModule segfaults at this line:
>
>      module = mgr.config->getSections().find(modName);
>
> I recognize it might be related to my own environment.  This is the
> entire content of my /etc/sword:
> [Install]
> DataPath=/usr/share/sword/
>
> Does someone have an idea for what I'm missing, or an example to direct
> me to so I can get a better handle on this area of code?
>
> Thanks,
> - Paul M
>
> _______________________________________________
> sword-devel mailing list: [email protected]
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>

_______________________________________________
sword-devel mailing list: [email protected]
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.