lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Paths in configuration file (was: [lmi-commits] master 0c2d6b4


From: Vadim Zeitlin
Subject: Re: [lmi] Paths in configuration file (was: [lmi-commits] master 0c2d6b4 30/33: Revert "Revert "Trap exceptions from filesystem library"")
Date: Fri, 14 May 2021 21:37:10 +0200

On Fri, 14 May 2021 16:21:43 +0000 Greg Chicares <gchicares@sbcglobal.net> 
wrote:

GC> On 5/14/21 1:38 PM, Vadim Zeitlin wrote:
GC> > On Mon,  3 May 2021 08:15:56 -0400 (EDT) Greg Chicares 
<gchicares@sbcglobal.net> wrote:
GC> > 
GC> > GC> branch: master
GC> > GC> commit 0c2d6b415b881858794a2a9713eac962f8f54a45
GC> [...]
GC> > GC>     However, given '/opt/lmi/data/configurable_settings.xml' contents:
GC> > GC>       
<default_input_filename>Z:/etc/opt/lmi/default.ill</default_input_...
GC> > GC>       <print_directory>Z:/opt/lmi/print</print_directory>
GC> > GC>     lmi-gtk's GUI now shows
GC> > GC>       Input defaults: /opt/lmi/bin/Z:/etc/opt/lmi/default.ill
GC> > GC>       Printout directory: /opt/lmi/print
GC> > GC>     where one textcontrol is as intended but the other is not. It is 
not
GC> > GC>     clear whether the reverted commit has anything to do with that, 
but
GC> > GC>     it seems wise to back it out temporarily pending investigation of 
this
GC> > GC>     anomaly. The present commit can be reverted (enthusiastically) 
later.
GC> > 
GC> >  I'd like to debug and really fix this, but first of all I'd like to
GC> > understand what exactly are we trying to do here, i.e. which control is
GC> > considered to be "as intended" and which one is not?
GC> 
GC> I ran lmi-msw and saved configurable settings; result above.
GC> 
GC> Then I ran lmi-gtk, in the same /opt/lmi/ hierarchy, and therefore
GC> using the same configurable-settings file. I expected the msw
GC> drive-letter-colon prefix to be removed, so that in the gtk GUI
GC> I'd see:
GC>   /etc/opt/lmi/default.ill
GC>   /opt/lmi/print
GC> The "Printout directory" came out as I had expected.
GC> 
GC> The problem is that the "Input defaults" came out this way:
GC>   /opt/lmi/bin/Z:/etc/opt/lmi/default.ill
GC> That's just wrong.

 Yes, I think we can all agree with this.

GC> After closing lmi-msw and starting lmi-gtk, the dialog shows:
GC>   Input defaults:     /opt/lmi/bin/Z:/etc/opt/lmi/xyzzy.ill
GC>   Printout directory: /opt/lmi/print
GC> as before. "Input defaults" is obviously wrong on the face of it.
GC> None of my experiments has prevented that.

 What confused me was that having, or not having, 0c2d6b415 (Revert "Revert
"Trap exceptions from filesystem library"", 2021-05-02) and/or,
equivalently, dab074e38 (Revert "Trap exceptions from filesystem library",
2020-11-27), doesn't change anything neither. OTOH it's reassuring that it
doesn't, because at least I don't have to understand how it could.

GC> I didn't check whether that commit had any causal relationship
GC> with the reported error. But something is demonstrably wrong
GC> and needs to be fixed.

 The surface fix is simple: we just need to apply remove_alien_msw_root()
to default_input_filename_ too. As you yourself wrote in the commit message
of 550da79ad (Remove alien msw root-name from configurable print directory,
2020-11-11), which added it for the print directory, it should also be done
for the other path unless some other solution is found.

 Should I make a patch doing this? I'd also still like to revert 0c2d6b415
if I do this. In fact, I'd like to revert it even if I don't, because it
just doesn't seem to do anything useful while making the code longer and
more complicated.


GC> If we're going to step back and redesign anything, then IIRC
GC> we should step back farther and do a deeper redesign--I think
GC> I cited some older email thread on that topic, somewhere earlier
GC> in the present thread. I have no time to work on that myself now.
GC> But either we fix the problem at the surface, or at the root--not
GC> anywhere in between.

 I don't know if you'd like to discuss this now, I'm not _too_ bothered by
this and it definitely doesn't prevent me from working on other things, and
so there is no particular urgency here from my point of view. But I'd be
curious to know what do you mean by deeper redesign.

 FWIW I don't see how can we make this work reasonably well if we keep
using the same configuration file for both versions. I think this file must
be (logical) machine-specific and lmi-gtk and lmi-msw run on 2 different
(logical) machines, even if they happen to execute on the same physical
machine. This isn't really different from using a SMB network path from 2
completely different MSW machines, with their own directories structures,
i.e. the same problem can happen even for the machines using the same OS.
If one of them keeps lmi on C: drive and another on D:, switching between
them will warn about non-existent print directory every time and the only
solution I see is to just not share the same file, but use per-machine
configuration file. If you have another idea about how could this be made
to work, I'd like to know about it (but, again, there is nothing urgent
about it).

GC> First let's see whether you can even reproduce the problem
GC> with the elaborated steps above.

 To be clear, I don't have, and never had, any problems with seeing what
you saw, it's just that I couldn't see any effect of 0c2d6b415 on it. And I
think you've just confirmed that you didn't really see it neither, so there
is no problem here.

 Thanks,
VZ

Attachment: pgprjI0DJrOcA.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]