[77739] trunk/base/src/port1.0/portinstall.tcl

jmr at macports.org jmr at macports.org
Sun Apr 10 18:31:53 PDT 2011


Revision: 77739
          http://trac.macports.org/changeset/77739
Author:   jmr at macports.org
Date:     2011-04-10 18:31:53 -0700 (Sun, 10 Apr 2011)
Log Message:
-----------
only use -q flag when tar is bsdtar

Modified Paths:
--------------
    trunk/base/src/port1.0/portinstall.tcl

Modified: trunk/base/src/port1.0/portinstall.tcl
===================================================================
--- trunk/base/src/port1.0/portinstall.tcl	2011-04-11 00:45:29 UTC (rev 77738)
+++ trunk/base/src/port1.0/portinstall.tcl	2011-04-11 01:31:53 UTC (rev 77739)
@@ -425,22 +425,27 @@
 }
 
 proc portinstall::extract_contents {location type} {
+    set qflag ""
+    # should probably really check if this is supported by tar at configure time
+    if {([option os.major] >= 10 && [option os.platform] == "darwin") || [string match *bsd [option os.platform]]} {
+        set qflag "q"
+    }
     switch -- $type {
         tbz -
         tbz2 {
-            set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xOjqf $location +CONTENTS]
+            set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xOj${qflag}f $location +CONTENTS]
         }
         tgz {
-            set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xOzqf $location +CONTENTS]
+            set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xOz${qflag}f $location +CONTENTS]
         }
         tar {
-            set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xOqf $location +CONTENTS]
+            set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xO${qflag}f $location +CONTENTS]
         }
         txz {
-            set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xOqf $location --use-compress-program [findBinary xz ""] +CONTENTS]
+            set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xO${qflag}f $location --use-compress-program [findBinary xz ""] +CONTENTS]
         }
         tlz {
-            set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xOqf $location --use-compress-program [findBinary lzma ""] +CONTENTS]
+            set raw_contents [exec [findBinary tar ${portutil::autoconf::tar_path}] -xO${qflag}f $location --use-compress-program [findBinary lzma ""] +CONTENTS]
         }
         xar {
             system "cd ${workpath} && [findBinary xar ${portutil::autoconf::xar_path}] -xf $location +CONTENTS"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110410/8d64b729/attachment.html>


More information about the macports-changes mailing list