Tuesday, 22 September 2020

Re: [Rpcemu] [PATCH] RPCEmu XDG-BaseDir support

On Tue, 2020-09-22 at 19:02 +0100, Peter Howkins wrote:
> On Tue, 22 Sep 2020 at 18:08, Steven Newbury <steve@snewbury.org.uk>
> wrote:
> > On Tue, 2020-09-22 at 17:39 +0100, Peter Howkins wrote:
> > > On Tue, 22 Sep 2020 at 16:17, Steven Newbury <
> > steve@snewbury.org.uk>
> > > wrote:
> > > > On Tue, 2020-09-22 at 16:00 +0100, Steven Newbury wrote:
> > > > > I thought I'd add RPCEmu to my Gentoo overlay, but given it
> > only
> > > > > supports a hard-coded data path it doesn't lend itself to
> > > > packaging
> > > > > for
> > > > > system-wide installation on *NIX. So I've added support for
> > > > multiple
> > > > > search directories and XDG-BaseDir through libxdg-basedir.
> > > > >
> > > > Just noticed I didn't finish removing the fixed stack allocated
> > > > filename buffers. Probably not the only issues. Please let me
> > > > know if
> > > > there's anything else to fix.
> > >
> > > Hello Steven, I'm afraid there are fundamental issues with this
> > that
> > > means I'm not interested in merging this approach, or any derived
> > > from it at this point.
> > >
> > Anything specific?
>
> If I'm reading it right
>
> 1) You can no longer run more than one copy of RPCEmu using different
> settings
You can use XDG_DATA_HOME to override the datadir, use multiple copies
with a different path. See:

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables


> 2) You're using XDG data directories that include system paths for
> things. This breaks horribly on multi-user systems, users shouldn't
> be sharing logs, config files, ide discs, hostfs, cmos files. About
> the only thing that could theoretically be shared is the ROM, as it's
> read-only, but as it's only one thing I can live with that also being
> a per-user-per-configuration thing.
That's exactly what XDG-Basedir is for. You can have system-wide
default config, roms etc, but any user settings override them, and
settings/resources are always saved to the local store. See spec
above.

> 3) You broke windows and macos (but that's a relatively small fix up)
Yes, I realised that, but it isn't easy for me to test, especially
macos. Multiple search paths should work there too I would have
thought.

> 4) By allowing the related config and files for a machine to be
> stored in separate directories on a system you lose the ability to
> keep them grouped for future multi-machine aware rpcemu (admittedly
> you wouldn't have been aware of that).

If I understand, you mean a group of directories for rom/disk/cmos etc
for a RiscPC vs A7000 in separate directorys one level up? Or
something else?

..

As an aside, I have to say RPCEmu is pretty awesome. It makes me want
to dig out my old hard disk from my StrongARM RiscPC, could even
resurrect some of my old RISC OS projects if I can find it and it still
works...

I actually had a support request for a free software application I
released back then a few years ago but couldn't help since my RiscPC
was broken!



_______________________________________________
RPCEmu mailing list
RPCEmu@riscos.info
http://www.riscos.info/cgi-bin/mailman/listinfo/rpcemu

No comments:

Post a Comment