Opened 10 years ago

Last modified 9 years ago

#526 assigned enhancement

Improve support for compress tar files

Reported by: Gregg Young Owned by: Gregg Young
Priority: minor Milestone: Release_3.25
Component: fm/2 base Version: 3.21
Keywords: Cc:

Description


Attachments (1)

ARCHIVER.BB2 (27.8 KB) - added by John Small 10 years ago.
John Small's ARCHIVER.BB2

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by Gregg Young

Owner: set to Gregg Young
Status: newassigned

comment:2 Changed 10 years ago by Gregg Young

Missing bzip2.exe and gzip.exe are not reported for TAR.B/GZ files. AV2 may try to test with an archiver that doesn't exist when one that does exist is available or it may use the command line parameters from an older version with unknown consequences.

comment:3 Changed 10 years ago by Steven Levine

Summary: Improve archiver error reportingImprove support for compress tar files

fm/2 does not support compressed tar files in a generic fashion. This is not unexpected because archiver.bb2 was invented without compressed tar files in mind.

IMO, the correct solution is to enhance the archiver.bb2 format to allow us to name the compressor executable so that its exsistance can be checked for. This means an archiver.bb2 definition would now be 22 lines with line 22 naming the compressor executable. If needed we can add a line 23 to specify the switches to be passed to the compressor.

Another option is to fully implement the same recognition logic that tar supports. See section 8.1.1 of tar.info. The man page does not fully documented how this works. For example, the info doc lists

Suffix Compression program -------------------------------------------------------------- .gz gzip .tgz gzip .taz gzip .Z compress .taZ compress .bz2 bzip2 .tz2 bzip2 .tbz2 bzip2 .tbz bzip2 .lzma lzma .tlz lzma

as supported and the `--use-compress-program=PROG' option can handle almost anything else.

I don't think it's a good idea to add special case code to fm/2 if it can be avoided. We will never be able to handle all the possible special cases. The current special case code supports tar.bz but what about tar.xz and all the other compression methods that tar supports internally and externally. Like I said, I believe this is better handled in archiver.bb2.

comment:4 Changed 10 years ago by John Small

As requested, I have uploaded my archiver.bb2 file.

Changed 10 years ago by John Small

Attachment: ARCHIVER.BB2 added

John Small's ARCHIVER.BB2

comment:5 in reply to:  3 Changed 10 years ago by John Small

Replying to stevenhl:

fm/2 does not support compressed tar files in a generic fashion. This is not unexpected because archiver.bb2 was invented without compressed tar files in mind.

IMO, the correct solution is to enhance the archiver.bb2 format to allow us to name the compressor executable so that its exsistance can be checked for. This means an archiver.bb2 definition would now be 22 lines with line 22 naming the compressor executable. If needed we can add a line 23 to specify the switches to be passed to the compressor.

Another option is to fully implement the same recognition logic that tar supports. See section 8.1.1 of tar.info. The man page does not fully documented how this works. For example, the info doc lists

Suffix Compression program -------------------------------------------------------------- .gz gzip .tgz gzip .taz gzip .Z compress .taZ compress .bz2 bzip2 .tz2 bzip2 .tbz2 bzip2 .tbz bzip2 .lzma lzma .tlz lzma

as supported and the `--use-compress-program=PROG' option can handle almost anything else.

I don't think it's a good idea to add special case code to fm/2 if it can be avoided. We will never be able to handle all the possible special cases. The current special case code supports tar.bz but what about tar.xz and all the other compression methods that tar supports internally and externally. Like I said, I believe this is better handled in archiver.bb2.

===

I agree completely, especially the comment that special case code like this is not a good idea.

comment:6 Changed 9 years ago by Gregg Young

Milestone: Release_3.23Release_3.24

Ticket retargeted after milestone closed

comment:7 Changed 9 years ago by Gregg Young

Milestone: Release_3.24Release_3.25
Note: See TracTickets for help on using tickets.