brouhaha / tapeutils

GNU General Public License v2.0
21 stars 5 forks source link

t10backup fails to extract files #4

Closed larsbrinkhoff closed 7 years ago

larsbrinkhoff commented 7 years ago

t10backup can't extract this tape image. It can succefully list the contents, though.

https://github.com/PDP-10/essex-bcpl/raw/tape/BCPL.tap

larsbrinkhoff commented 7 years ago

Output from t10backup -v -t -f BCPL.tap:

Saveset name: BCPL 3H(103) SAVE 1
Written on: 603046.002
  1  bcpl.exe (36) alloc:13824, mode:16, len:13312
  2  bcpl.mas (36) alloc:74880, mode:14, len:74487
  3  bcpl00.exe (36) alloc:17280, mode:16, len:16896
  4  bcpl01.exe (36) alloc:18816, mode:16, len:18432
  5  bcpl02.exe (36) alloc:13824, mode:16, len:13312
  6  bcpl03.exe (36) alloc:3840, mode:16, len:3584
  7  360lib.mas (7) alloc:1920, mode:0, len:7185
  8  acs.get (7) alloc:384, mode:0, len:640
  9  arrlib.get (7) alloc:384, mode:0, len:140
...
 64  bcplib.mas (36) alloc:29568, mode:14, len:29038
 65  bcpl.dir (7) alloc:1152, mode:0, len:4340
 66  bcplib.rel (36) alloc:18048, mode:14, len:17475
larsbrinkhoff commented 7 years ago

There is no output from t10backup -v -x -f BCPL.tap. Exit code is 0.

With -vv, there is plenty of output, so it does seem to go through much of the content without extracting anything.

And if I hack doextract() in t10backup.c to never set extracting=false, it seems to extract everything.

hrlzm commented 7 years ago

The original backup utility (yes, me guilty) needs one or more arguments to tell it what to extract, like "backup -xf BCPL.tap ", then it will extract all files that match one (or more) of the arguments. The arguments can be either a partial string matching the generic file name from the tape, or the actual number of the file, like "#8" for file number eight, i.e. "acs.get" in the example above. The partial name "." will of cause match all files... The case of no files listed should cause all files to be extracted, but the program is stupid and happens to do exactly what you tell it to, i.e nothing.

I assume that this behaviour has been inherited in all future versions of the program.

--Johnny

hrlzm commented 7 years ago

... and since I wrote "backup -xf BCPL.tap arg arg" with angle brackets around the word arg, it got a free massage by the github commenting system...

--Johnny

larsbrinkhoff commented 7 years ago

D'oh! Adding a * to the end of the command line works fine.