Hi Greg, I few quick comments and thoughts...
So, regarding the commandline tool and option: installmgr -init This simply does: SWBuf baseDir = FileMgr::getSystemFileMgr()->getHomeDir(); if (baseDir.length() < 1) baseDir = "."; baseDir += "/.sword/InstallMgr"; confPath = baseDir + "/InstallMgr.conf"; So, regarding its own configuration and temporary storage, it always uses, basically ~/.sword/installMgr/ SWORD_PATH should be honored regarding WHERE to finally install modules, but they will first always be downloaded to ~/.sword/installMgr and once a successful download is completely, the install to SWORD_PATH should happen. Also, SWORD has a long list of rules it uses to find your SWORD library, each with precedence. For example, a SWORD library detected in you CWD is highest priority. i.e., be sure you aren't running the command from a folder which has a mods.conf file or mods.d/ folder or it will think you wish to operate on your CWD. And on the positive side, try to cd ~/.sword and run installmgr (assuming a ~/.sword/mods.d/ folder exists). You shouldn't have to set SWORD_PATH for installmgr to install to ~/.sword if it is your CWD. I am curious that you got it working without /etc/sword.conf entries. You can always see the rules used to determine your library location by turning log level all the way up: SWORD_LOGLEVEL=DEBUG ~/src/sword/utilities/installmgr -ri CrossWire KJV You will get all kinds of noise, but near the top (I would recommend a tput clear, to reset your scrollback buffer), you should see: [0.00146] Checking working directory for mods.d... [0.00146] found. [0.00147] LOOKING UP MODULE CONFIGURATION COMPLETE. Just a few things to try experimenting with. Troy On 2/5/21 10:50 AM, Greg Hellings wrote: > PREAMBLE: > I'm trying to install modules with installmgr on the command line. I > seem to frequently run into issues with it silently dumping the files > somewhere where they don't actually exist, and it's happening again. > But I think I've narrowed down some of when it happens: > > I currently have a /etc/sword.conf that points to /usr/local/share. In > that folder there are locale.d, mods.d, and modules folders, but the > folder is not writable. This works as expected, installmgr downloads > the files then tries to write them and says it failed and suggests it > might be my permissions. > > FIRST ISSUE: > So I set SWORD_PATH to ~/.sword. I run installmgr init, sync, update > CrossWire, and try to install KJV. Now I get an attempt to write the > files - the kjv.conf gets written into mods.d, but the data files are > nowhere to be found. No errors, either. Debugging is telling me it's > trying to write them into ~/.sword/modules/texts/ztext/kjv, and it > successfully creates the modules/texts/ztext folders, but nothing > below that. Not the "kjv" folder and no data files. So now I try > setting SWORD_PATH to ~/.local/share/sword. Same result as before. > > Once I comment out the entries in /etc/sword.conf, all is well! I get > my files AND my folder structure. But only when SWORD_PATH is set to > ~/.local/share/sword/. No luck under ~/.sword/. It still misbehaves. > > SECOND ISSUE: > With SWORD_PATH set to ~/.local/share/sword/, I try running installmgr > sync again after deleting my ~/.sword directory. It's writing files to > ~/.sword still. This is despite the debugging telling me "Checking > $SWORD_PATH... found(/var/home/ghelling/.local/share/sword)". Yes, I > know the folder path is odd but ~/ is /var/home/ghelling on Fedora > Silverblue. > > If I'm setting SWORD_PATH to ~/.local/share/sword, then shouldn't > installmgr also honor that path for downloading its files? And > shouldn't installmgr be able to write the data files to ~/.sword in > the first case? > > --Greg > > _______________________________________________ > sword-devel mailing list: sword-devel@crosswire.org > http://crosswire.org/mailman/listinfo/sword-devel > Instructions to unsubscribe/change your settings at above page
_______________________________________________ sword-devel mailing list: sword-devel@crosswire.org http://crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page