bugGNU Octave - Bugs: bug #40274, unpack error on failure to move...


bug #40274: unpack error on failure to move files into destination dir

Submitted by:  Muhali <muhali>
Submitted on:  Tue 15 Oct 2013 08:45:10 AM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Wed 25 Nov 2015 07:35:13 PM UTC, comment #10:

Okay, I added a change here which appears to fix the unpack issue (http://hg.savannah.gnu.org/hgweb/octave/rev/46b15c018fa5). At this point, both tar.gz and gz archives extracted through URLs to /tmp seem to work. The examples I used were

Rik <rik5>
Project Administrator
Wed 25 Nov 2015 03:26:32 PM UTC, comment #9:

Unpacking a tar from a URL works for me. Unpacking a compressed file as in the original comment leaves it as a "oct-XXXXXX" file, is that correct?

Mike Miller <mtmiller>
Project Administrator
Tue 24 Nov 2015 08:25:29 PM UTC, comment #8:

Actually, could someone else check? Everything seems to work okay now for

Rik <rik5>
Project Administrator
Tue 24 Nov 2015 07:55:56 PM UTC, comment #7:

I fixed bug #46504.

Now when I attempt to unpack one of the URL examples from this bug report into '/tmp' I end up with the file in a temporary name. For example, "oct-4mSrub.tar.gz" instead of "bc-1.03.tar.gz.

Rik <rik5>
Project Administrator
Tue 24 Nov 2015 07:14:07 PM UTC, comment #6:

see bug #46504. The reason is the call to glob that was added recently (and which does not work for urls).

Muhali <muhali>
Sat 21 Nov 2015 03:42:50 PM UTC, comment #5:

Is this bug relevant anymore? I tried the command in question and I now get a "file not found" error from Octave. Apparently http and ftp files are no longer accepted directly into unpack, only real files on a local filesystem.

Rik <rik5>
Project Administrator
Tue 22 Oct 2013 01:47:19 AM UTC, comment #4:

Confirmed in two cases. First, your case where you are unpacking from a URL string into /tmp. This is because the URL is first saved to a temporary file in /tmp and then the unpack function fails to recognize that the file is already in /tmp so it doesn't need to be moved.

The other case is when an absolute or relative path are given to a file to unpack and the destination directory is actually the same path.

There is logic in the function already to try to figure out when it needs to move files or not, but that only works if the first argument is a plain file with no path component.

Mike Miller <mtmiller>
Project Administrator
Tue 15 Oct 2013 11:37:59 AM UTC, comment #3:

well, savannah does not like my quoted text. Here it is unquoted:

unpack("http://mirrors.ctan.org/support/tex2rtf/rtfutils/rtftohtml/README.gz", "/tmp")

Muhali <muhali>
Tue 15 Oct 2013 11:34:55 AM UTC, comment #2:

one more time:

Muhali <muhali>
Tue 15 Oct 2013 11:32:33 AM UTC, comment #1:

Sorry, the first command was meant to be

Muhali <muhali>
Tue 15 Oct 2013 08:45:10 AM UTC, original submission:

unpacking into /tmp produces the following:

mv: `/tmp/oct-WqCcGr' and `/tmp/oct-WqCcGr' are the same file
error: unpack: unable to move files to "/tmp":
error: called from:
error: /usr/local/share/octave/3.7.7+/m/miscellaneous/unpack.m at line 207, column 9

Corresponding errors occur with unpacking tar files. For example,

just produces a copy of bc-1.03.tar.gz in /tmp. In contrast,

does extract into /tmp/foo.

Muhali <muhali>


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

Attach Files:

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 mtmiller (Posted a comment)
  • -email is unavailable- added by muhali (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-26 rik5 Open/ClosedOpen => Closed
    2015-11-25 rik5 StatusReady For Test => Fixed
    2015-11-24 rik5 StatusConfirmed => Ready For Test
    2015-11-24 rik5 StatusNeed Info => Confirmed
    2015-11-21 rik5 StatusConfirmed => Need Info
    2013-10-22 mtmiller CategoryNone => Octave Function
        Item GroupNone => Incorrect Result
        StatusNone => Confirmed
        Summaryunpack into /tmp name clash => unpack error on failure to move files into destination dir

    Back to the top

    Powered by Savane 3.3