com web/rmtools: preffer bsdtar over gnu tar: client/include/PeclExt.php

From: Date: Tue, 01 Oct 2013 11:47:30 +0000
Subject: com web/rmtools: preffer bsdtar over gnu tar: client/include/PeclExt.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-19134@lists.php.net to get a copy of this message
Commit: 4356cbc66627a32796ea7de354565cad9b04fcc1 Author: Anatol Belski <ab@php.net> Tue, 1 Oct 2013 13:47:30 +0200 Parents: 6d48676881a734315edc8503491347de0f08e9be Branches: master Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=4356cbc66627a32796ea7de354565cad9b04fcc1 Log: preffer bsdtar over gnu tar Changed paths: M client/include/PeclExt.php Diff: diff --git a/client/include/PeclExt.php b/client/include/PeclExt.php index 6cac35c..14e688b 100644 --- a/client/include/PeclExt.php +++ b/client/include/PeclExt.php @@ -207,12 +207,13 @@ class PeclExt } } - /* try gnu tar first */ - $tar_cmd = $this->tar_cmd . ' --no-same-owner --no-same-permissions -xf ' . escapeshellarg($tar_name); + /* try with bsdtar first */ + $tar_cmd = $this->bsdtar_cmd . ' -xf ' . escapeshellarg($tar_name); system($tar_cmd, $ret); if ($ret) { - /* not done yet, retry with bsdtar */ - $tar_cmd = $this->bsdtar_cmd . ' -xf ' . escapeshellarg($tar_name); + /* no fail yet, retry with gnu tar */ + $tar_opts = ' --no-same-owner --no-same-permissions -xf '; + $tar_cmd = $this->tar_cmd . $tar_opts . escapeshellarg($tar_name); system($tar_cmd, $ret); if ($ret) { /* definitely broken, give up */

« previous php.webmaster (#19134) next »