Re: cvs: pecl /phar phar.c

From: Date: Sun, 23 Mar 2008 11:34:31 +0000
Subject: Re: cvs: pecl /phar phar.c
References: 1  Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-10030@lists.php.net to get a copy of this message
Hi Greg, The last time we discussed this, it came to 'a tar is a plain tar (regardless of INI settings) and cannot be converted by simply adding a stub'. This is a question of design rather than one of implementation, and really we should have put down the specs in black and white. I'd appreciate it if you could take the time to do that before you disappear on tour, since in the long run it'll mean less work for both of us. Specs could go on the wiki or in a file in pecl/phar, but they need to be somewhere accessible. Similarly, I still have some unanswered questions about the new approach to conversion, which means there are areas where I've no idea what you expect, but I've agreed to code it. Now that sounds like a disaster waiting to happen if ever I heard one :) - Steph ----- Original Message ----- From: "Greg Beaver" <cellog@php.net> To: <pecl-cvs@lists.php.net> Sent: Sunday, March 23, 2008 6:59 AM Subject: [PECL-CVS] cvs: pecl /phar phar.c
cellog Sun Mar 23 06:59:58 2008 UTC Modified files: /pecl/phar phar.c Log: don't disallow opening .tar/.zip files as Phar object if readonly is disabled, the whole idea is to be able to add crap including an automatic stub or explicit stub http://cvs.php.net/viewvc.cgi/pecl/phar/phar.c?r1=1.320&r2=1.321&diff_format=u Index: pecl/phar/phar.c diff -u pecl/phar/phar.c:1.320 pecl/phar/phar.c:1.321 --- pecl/phar/phar.c:1.320 Sun Mar 23 05:39:57 2008 +++ pecl/phar/phar.c Sun Mar 23 06:59:58 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar.c,v 1.320 2008/03/23 05:39:57 cellog Exp $ */ +/* $Id: phar.c,v 1.321 2008/03/23 06:59:58 cellog Exp $ */ #define PHAR_MAIN 1 #include "phar_internal.h" @@ -423,7 +423,7 @@ if (!is_data) { /* prevent any ".phar" without a stub getting through */ if (!phar->halt_offset && !phar->is_brandnew) { - if (FAILURE == zend_hash_find(&(phar->manifest), ".phar/stub.php", sizeof(".phar/stub.php")-1, (void **)&stub)) { + if (PHAR_G(readonly) && FAILURE == zend_hash_find(&(phar->manifest), ".phar/stub.php", sizeof(".phar/stub.php")-1, (void **)&stub)) { spprintf(error, 0, "'%s' is not a phar archive. Use PharData::__construct() for a standard zip or tar archive", fname); return FAILURE; } @@ -2827,7 +2827,7 @@ php_info_print_table_header(2, "Phar: PHP Archive support", "enabled"); php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION); php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION); - php_info_print_table_row(2, "CVS revision", "$Revision: 1.320 $"); + php_info_print_table_row(2, "CVS revision", "$Revision: 1.321 $"); php_info_print_table_row(2, "Phar-based phar archives", "enabled"); php_info_print_table_row(2, "Tar-based phar archives", "enabled"); php_info_print_table_row(2, "ZIP-based phar archives", "enabled"); -- PECL CVS Mailing List To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.pecl.cvs (#10030) next »