Re: Re: Modification of Package.php
| From: | Vincent Blavet | Date: | Wed, 23 Jan 2002 23:39:34 +0000 |
| Subject: | Re: Re: Modification of Package.php | ||
| References: | 1 2 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-2070@lists.php.net to get a copy of this message | ||
Tomas,
The modifications I proposed does not bypass any checks. The modification is
only on the archive creation of a package. Rather than using a temporary
dir, and then archiving it, I just directly give the list of files to
archive to the Arcive_Tar object. If some checks need to be done, there can
still be done while creating the list of concerned files.
So I think the modification does not limit or change the actual
functionality, it is only a code improvment.
By the way, most of the tests (update, install, ...) are done in the install
part of the package manager.
So if no negative feedback, I will commit the changes in Packager.php
About the support of several package.xml files. I didn't see any support of
several package in a single archive. Today for one package.xml (or any one
package-xxx.xml), a single archive is created in the Packager.php code.
Same thing in the install part of the packager manager (Install.php) : The
archive is extracted in a temporary directory. The Installer.php looks for
the package.xml file and then several tests are done (in particular
different behavior between 'upgrade' and 'install').
Today it seems the package manager support other file name than the
package.xml one. I can create an archive with any .xml package descriptor
file, but while doing the install part, it looks for 'package.xml'.
Vincent
----- Original Message -----
From: "Tomas V.V.Cox" <cox@idecnet.com>
To: "Vincent Blavet" <vincent@blavet.net>
Cc: <pear-cvs@lists.php.net>; <ssb@fast.no>
Sent: Wednesday, January 23, 2002 9:37 PM
Subject: [PEAR-CVS] Re: Modification of Package.php
El mar, 22-01-2002 a las 23:50, Vincent Blavet escribió:
> The current Packager.php file is creating tar archive (.tgz) by using a
temporary directory in which it copies all the files before doing the
archive. The temporary directory is not removed.
I also realized that. I tracked down the problem and ended here:
http://bugs.php.net/bug.php?id=14744 :-)
> I did major changes in the Package.php file in order to improve that.
Archive_Tar can be used to directly read the files where they are and even
add a 'virtual' path which is not the real path of the files.
> These changes will remove a lot of PHP code and will do less file copies.
>
> Because Packager.php is an important piece of the PEAR package downloading
& installation, I did not commit the change in php4/pear/PEAR.
>
> Can you please have a look to the modified file attached and tell me if I
can proceed with the commit ?
> (BTW I did put in comment the code to remove in the attached file, but I
will commit a cleaned file).
The changes looks pretty good, but I guess we shouldn't bypass certain
checks.
For example if the files in package.xml really exists. Other thing that
should
be kept is the ability to select different package files.
For example this is supported now:
PACK_DIR
|
+--package-v2.xml
+--package-current.xml
So you could maintain different package.xml files for different purpouses.
For
the rest and if works I'm all for it.
Tomas V.V.Cox
--
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, e-mail: pear-cvs-unsubscribe@lists.php.net
For additional commands, e-mail: pear-cvs-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net