octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53695] tar.m and unpack.m are incompatible wi


From: Andrew Janke
Subject: [Octave-bug-tracker] [bug #53695] tar.m and unpack.m are incompatible with BSD tar
Date: Sun, 24 Jun 2018 17:09:14 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36

Follow-up Comment #13, bug #53695 (project octave):

@sschoeps: I patched octave to use "gtar" as you suggested, and it worked.


diff --git a/scripts/miscellaneous/tar.m b/scripts/miscellaneous/tar.m
index 6d73eef..d516830 100644
--- a/scripts/miscellaneous/tar.m
+++ b/scripts/miscellaneous/tar.m
@@ -60,7 +60,7 @@ function filelist = tar (tarfile, files, rootdir = ".")
     tarfile = __w2mpth__ (tarfile);
   endif
 
-  cmd = sprintf ("tar cvf %s -C %s %s",
+  cmd = sprintf ("gtar cvf %s -C %s %s",
                           tarfile, rootdir, sprintf (" %s", files{:}));
 
   ## Save and restore the TAR_OPTIONS environment variable used by GNU tar.
diff --git a/scripts/miscellaneous/unpack.m b/scripts/miscellaneous/unpack.m
index 56ea975..3eba050 100644
--- a/scripts/miscellaneous/unpack.m
+++ b/scripts/miscellaneous/unpack.m
@@ -174,8 +174,8 @@ function filelist = unpack (file, dir = ".", filetype =
"")
                        'bzip2 -d -f "%s"', ...
                        @__parse_bzip2__, true};
     commandlist.bz = commandlist.bz2;
-    commandlist.tar = {'tar xvf "%s"', ...
-                       'tar xf "%s"', ...
+    commandlist.tar = {'gtar xvf "%s"', ...
+                       'gtar xf "%s"', ...
                        @__parse_tar__, false};
     commandlist.targz = {'gzip -d -c "%s" | tar xvf -', ...
                          'gzip -d -c "%s" | tar xf -', ...


Test is passing now.


>> test tar
PASSES 6 out of 6 tests
>> test unpack
PASSES 9 out of 9 tests


Note that this patch is a hack specific to Octave.app on macOS; it is not a
general fix for this bug.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53695>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]