<html><head></head><body>Hi Tobias. There is some feature in InstallMgr which returns the status of a module as: not installed, installed but an update is available, installed and up to date. I know this isn't what you want, but was as far as we wanted to go with defining module info. I guess InstallMgr could add a line into the .conf when installing: InstalledFrom, but that could be a side load, a local repo, another SWORD application install on a local lan, or one of our remote sources which might not still host the module. So, I guess, without fully knowing your use case, are you looking for where the module is now available, or from where it was installed? Is there a use case you can describe which you see giving value to the user, maybe we can try to solve together?<br><br>Blessings,<br><br>Troy<br><br><div class="gmail_quote">On September 27, 2019 1:58:20 PM MST, contact@tklein.info wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Ok. In this case (if there are potentially multiple source repo's for <br>one given module) could a list be returned?<br>This is quite common for 1:n relationships in databases as well ...<br><br>Best regards,<br>Tobias<br><br>Quoting Greg Hellings <greg.hellings@gmail.com>:<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Currently the engine does not intentionally preserve any information about<br> where a module comes from. This is why, for a single installer, it cannot<br> handle having parallel installs of the same module from different sources<br> (e.g. you can't have both CrossWire KJV and your own homegrown KJV in<br> parallel without giving your own a different module name).<br><br> There's nothing stopping an application from creating different local<br> repos, one for each upstream, and then combining the two using its own<br> logic. However, this isn't something the library currently supports. The<br> fact that you can reverse engineer its source, at present, is only because<br> none of the main repositories duplicates module identifiers from any other<br> repositories. However there is nothing, technically speaking, that prevents<br> this. Thus, module pedigree is not, necessarily, a deterministic thing.<br><br> --Greg<br><br> On Fri, Sep 27, 2019 at 2:28 PM <contact@tklein.info> wrote:<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> Hi,<br><br> Using the SWORD API, is there an easy way to determine the<br> remote/source repository a module is coming from?<br><br> I haven't found anything in the SWModule class or anywhere else.<br><br> This would be my approach without any API method:<br> 1) Get the config entry "PrefixPath" using<br> SWModule::getConfigEntry("PrefixPath"). This returns something like<br> this:<br> /home/tobi/.sword/installMgr/20151110161300/<br> 2) The last part of the path above is the "id" of the source repository<br> 3) Looking up ~/.sword/installMgr/masterRepoList.conf I can find the<br> mapping between the repo id and the actual repository name from a line<br> like this one: 20151110161300=FTPSource=eBible.org|ftp.ebible.org|/sword<br><br> Would it make sense to provide a method in the SWModule or InstallMgr<br> class to easily get this information?<br> This would be useful meta information when showing an about dialog for<br> a module and I also see other use cases.<br><br> Best regards,<br> Tobias<hr> sword-devel mailing list: sword-devel@crosswire.org<br> <a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br> Instructions to unsubscribe/change your settings at above page<br><br></blockquote></blockquote><hr>sword-devel mailing list: sword-devel@crosswire.org<br><a href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>Instructions to unsubscribe/change your settings at above page<br></pre></blockquote></div><br>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>