<div dir="ltr">Just to prove to myself that I'm not completely crazy, I just did the same process on my Windows machine where I'm running Fedora 33 in WSL2, using the exact same bits and bytes of SWORD.<div><br></div><div>I still had to edit /etc/sword.conf to avoid writing files to /usr/share/sword, but it installed the KJV to ~/.sword without an issue, and is working flawlessly. So it's something wonky with my Fedora Silverblue box.</div><div><br></div><div>--Greg</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 5, 2021 at 2:34 PM Greg Hellings <<a href="mailto:greg.hellings@gmail.com">greg.hellings@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 5, 2021 at 12:49 PM Troy A. Griffitts <<a href="mailto:scribe@crosswire.org" target="_blank">scribe@crosswire.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hi Greg,</p>
<p>I few quick comments and thoughts...</p>
<p>So, regarding the commandline tool and option: installmgr -init</p>
<p>This simply does:</p>
<p> SWBuf baseDir =
FileMgr::getSystemFileMgr()->getHomeDir();<br>
if (baseDir.length() < 1) baseDir = ".";<br>
baseDir += "/.sword/InstallMgr";<br>
confPath = baseDir + "/InstallMgr.conf";</p>
<p>So, regarding its own configuration and temporary storage, it
always uses, basically ~/.sword/installMgr/</p>
<p>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.</p></div></blockquote><div>Is there a particular reason to not make that configurable via the same methods? It definitely threw me off, and in the world of Flatpaks, Snaps, AppImage, etc there are times where an application should be made to honor other configurations (e.g. making it relative to $XDG_DATA_DIR if that's defined instead of directly off of $HOME). I would have expected SWORD_PATH to be the mechanism used, so that was a surprise to me when it didn't.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<p>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.</p></div></blockquote><div>There were no mods.conf or mods.d folders in my CWD when I was running these. Running installmgr from within my ~/.sword folder still results in no files installed. But the mystery runs deeper. I just tried using the ASV module, and it worked fine. Then I installed NETfree, and it worked fine, but the data files for the ASV module were removed. Now I can't install any of them to ~/.sword. But they install to ~/.local/share/sword/ successfully.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<p>I am curious that you got it working without /etc/sword.conf
entries.</p></div></blockquote><div>Indeed, I could not get it working when that was set (I didn't try changing that to my homedir, I just commented out its contents entirely). </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<p>You can always see the rules used to determine your library
location by turning log level all the way up:</p>
<p>SWORD_LOGLEVEL=DEBUG ~/src/sword/utilities/installmgr -ri
CrossWire KJV<br></p></div></blockquote><div>Debugging output is how I knew it was claiming to write the files to the proper location. Those tell me all the proper values for destMgr->prefixPath properly pointing to ~/.sword or ~/.local/share/sword depending on my current environment settings. And before it writes the file it gives the full path. But, for whatever reason, that doesn't seem to be happening consistently.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p>
</p>
<p>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:</p>
<p>[0.00146] Checking working directory for mods.d...<br>
[0.00146] found.<br>
[0.00147] LOOKING UP MODULE CONFIGURATION COMPLETE.<br></p></div></blockquote><div>At this point, I can install the modules, but when I try to read them with diatheke, I get empty string outputs. They were working fine earlier today once I did get them installed.</div><div><br></div><div>So, basically, my experience with the modules install is non-deterministic and I'm about to pull my hair out trying to figure out what's going on! I don't know if it is my filesystem (BTRFS), my system (Fedora Silverblue is designed to be weird), something in my Fedora packaging of the library (always a possibility), or if I'm being bombarded with Gamma rays right now and it's causing my computer to spazz out. Everything I'm doing is still working wonderfully and deterministically in CI, so I guess that's a blessing.<br></div><div><br></div><div>Anyways, if you have any ideas on how I can further plumb the mysteries, I'd be happy to take them on.</div><div><br></div><div>--Greg</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p>
<br>
</p>
<p>Just a few things to try experimenting with.</p>
<p>Troy<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div>On 2/5/21 10:50 AM, Greg Hellings
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>PREAMBLE:</div>
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:
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>FIRST ISSUE:</div>
<div>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.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>SECOND ISSUE:</div>
<div>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.</div>
<div><br>
</div>
<div>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?</div>
<div><br>
</div>
<div>--Greg</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a>
<a href="http://crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
</blockquote>
</div>
_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br>
<a href="http://crosswire.org/mailman/listinfo/sword-devel" rel="noreferrer" target="_blank">http://crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page</blockquote></div></div>
</blockquote></div>