Nested archives in SparkFS

chat about arc/risc pc gaming & RISC OS software here (NOT the core OS!)Related forum: adventures


Post Reply
Boydie
Posts: 199
Joined: Sat Oct 24, 2015 8:25 am
Location: Sunny Wigan
Contact:

Nested archives in SparkFS

Post by Boydie » Thu May 24, 2018 9:13 pm

I’m trying to move my software archive between machines (some HostFS, some ADFS). Previous attempts have led to corrupted file attributes for random files.

The most bulletproof way to avoid this I’ve found is to compress them as a spark file and transfer that.

The only drawback is that some of the applications I’m transferring contain spark files (/zip or /arc) of their own. If I compress the application as the same file type (zip or arc) as the spark files contained within that application, then when I subsequently open the archive SparkFS also decompresses the archives nested within the parent application.

Is there any way of stopping it from doing this, so it only de-archives the parent archive and leaves the nested archives intact?

User avatar
jgharston
Posts: 3126
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: Nested archives in SparkFS

Post by jgharston » Fri May 25, 2018 9:37 am

Boydie wrote:The only drawback is that some of the applications I’m transferring contain spark files (/zip or /arc) of their own. If I compress the application as the same file type (zip or arc) as the spark files contained within that application, then when I subsequently open the archive SparkFS also decompresses the archives nested within the parent application.
It doesn't do that for me. If I open fred/zip and it contains jim/zip as a compressed archive I can drag jim/zip out of fred/zip and the resulting copy of jim/zip is a byte-identical copy of the compressed jim/zip. It would be useless for my purposes if it didn't do that.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

sirbod
Posts: 841
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Nested archives in SparkFS

Post by sirbod » Fri May 25, 2018 10:21 am

Boydie wrote:If I compress the application as the same file type (zip or arc) as the spark files contained within that application, then when I subsequently open the archive SparkFS also decompresses the archives nested within the parent application.
Try downloading ADFFS and extract it. It contains several ZIP's within the ZIP (!ADFFS.obey and !ADFFS.imaging.JFDrecord.) Do they also decompress?

What version of SparkFS are you using? And what Archive method are you using in the options?

Boydie
Posts: 199
Joined: Sat Oct 24, 2015 8:25 am
Location: Sunny Wigan
Contact:

Re: Nested archives in SparkFS

Post by Boydie » Mon May 28, 2018 3:45 pm

I’ve done a bit more experimenting. I use !sparkfs v 1.42.

Compressing as zip (ie /zip) in fact allows me to nest archives (either zip or arc) within each other and all wirks fine. Don’t know why I’ve struggled before).

Conpressing everything to a spark file (ie /arc) will allow zip files within it and works okay, but it still tries tode-archive any spark directories found within the parent. Disconcertingly, with varying degrees of success.

To test, I created a zip and sparkdir of the same files, then put both in the same directory. I then added that directory to both a spark dir and a zip file. At first, this seems to work fine but if I reboot, things go awry. Subsequently opening the master zip finds a directory containing a zip and a sparkdir, both of which open. Opening the master arc finds a directory contaning a zip and a “normal” directory instead of a sparkdir - the zip opens fine but the other one either appears as a normal
uncompressed directory or won’t open at all.

In the past, I’ve only used spark files for riscos stuff. I’m now trying to create long-term archives of all my riscos software (a fair few Gb). Is there anything that riscos can handle that won’t archive in a /zip, or is /zip just as capable as /arc?

User avatar
davidb
Posts: 2108
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Nested archives in SparkFS

Post by davidb » Mon May 28, 2018 5:17 pm

Boydie wrote:
Mon May 28, 2018 3:45 pm
Conpressing everything to a spark file (ie /arc) will allow zip files within it and works okay, but it still tries tode-archive any spark directories found within the parent. Disconcertingly, with varying degrees of success.
I couldn't understand exactly what the problem was with nested Spark archives until I tried them myself. I wasn't certain if you were dragging the contents of an archive to a directory on a disk or just browsing the contents of an archive. I now understand that it's the latter that seems to be a problem.

Previously, when I have dropped a Spark archive in a new archive, it still appears as an archive (see the sparkfs-6.png file). However, if you quit SparkFS (both the filer and the filing system) and reload it, opening the archive reveals that the nested archive was actually stored as a directory (see sparkfs-7.png).

I have a vague recollection about this being documented behaviour that could be controlled by an environment variable but perhaps my memory is playing tricks on me. It would be worth sending an e-mail to David Pilling or to his mailing list if you want to check that this is the intended behaviour.
Attachments
sparkfs-7.png
sparkfs-6.png

Post Reply