bugGNU Octave - Bugs: bug #54657, unpack fails with explicit archive...

 
 

bug #54657: unpack fails with explicit archive type

Submitter:  Muhali <muhali>
Submitted:  Thu 13 Sep 2018 04:15:50 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.4.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 24 Sep 2018 03:28:05 PM UTC, comment #4: 

The unpack function was a mess and the issues extended into untar, unzip, and the test suite.  I think I fixed everything up in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/75ed70a1c108).  It's on the development branch because there was so many changes in the end.

Rik <rik5>
Group administrator
Fri 14 Sep 2018 08:16:51 AM UTC, comment #3: 

I get the same error message as you, and a file "outz.zip".

Muhali <muhali>
Thu 13 Sep 2018 07:13:03 PM UTC, comment #2: 

But there is something totally wrong with the filetype processing.  The documentation says the filetype should be 'gz' for gzip format, but in fact the script requires 'gunzip'.

Rik <rik5>
Group administrator
Thu 13 Sep 2018 06:31:01 PM UTC, comment #1: 

Can you report the error you get as well?  When I try your code in octave-4.4.1 I get this:


octave:1> dlmwrite("out", pi) ;
octave:2>
octave:2> zfile = "out.zip" ;
octave:3> zip(zfile, "out") ;
octave:4> unpack(zfile) ;
octave:5>
octave:5> zfile = "outz" ;
octave:6> zip(zfile, "out") ;
octave:7> unpack(zfile, [], "zip") ;
error: unpack: FILE "outz" not found
error: called from
    unpack at line 93 column 9


The error is not really with unpack.  The zip() function automatically adds the extension ".zip" to a bare text filename.  When zfile is "outz" the result is "outz.zip" which then unpack can't find.

Rik <rik5>
Group administrator
Thu 13 Sep 2018 04:15:50 PM UTC, original submission:  

For the unpack function, the archive type can be explicitly specified in an argument. I assume that applies to cases where that type is not given by the file extension. But in that case it doesn't work, as shown by the error of the following script:


dlmwrite("out", pi) ;

zfile = "out.zip" ;
zip(zfile, "out") ;
unpack(zfile) ;

zfile = "outz" ;
zip(zfile, "out") ;
unpack(zfile, [], "zip") ;


Muhali <muhali>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by muhali (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-24 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2018-09-13 rik5 StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code