Chris Little wrote:
I have never heard of the module renaming facility that Eeli suggests,
and it is not part of the Sword library itself. When InstallMgr
discovers modules with the same ID in multiple repositories, it
assumes they refer to the same module (though possibly different
versions of it). By this facility, we publish one version via the
public repository while publishing a beta version (with an incremented
version number) from the beta repository. When testers download the
beta version, it overwrites the publicly released version, which can
only be regained by uninstalling and re-installing from the public
repository.
What's this then? The result is seen at least in BibleTime, and BT code
does nothing for it. It's from SWMgr::augmentModules():
// fix config's Section names to rename modules which are available
more than once
// find out which sections are in both config
objects
// inserting all configs first is not good
because that overwrites old keys and new modules would share the same config
for (SectionMap::iterator it =
config->Sections.begin(); it != config->Sections.end(); ++it) {
if (saveConfig->Sections.find(
(*it).first ) != saveConfig->Sections.end()) { //if the new section is
already present rename it
ConfigEntMap entMap((*it).second);
SWBuf name;
int i = 1;
do { //module name already used?
name.setFormatted("%s_%d", (*it).first.c_str(), i);
i++;
} while
(config->Sections.find(name) != config->Sections.end());
config->Sections.insert(SectionMap::value_type(name, entMap) );
config->Sections.erase(it);
}
}
--Eeli Kaikkonen
_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page