[zi-cvs] packages/com.zzoss.package.archive.lib Archive.php,1.2,1.3

Sandro Zic <[email protected]> Mon, 17 May 2004 10:25:23 +0000
Newsgroups gmane.comp.php.zzoss.installer.cvs
Message-ID <[email protected]>
Update of /cvsroot/zzossinstaller/packages/com.zzoss.package.archive.lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14920/com.zzoss.package.archive.lib

Modified Files:
	Archive.php 
Log Message:
- if a package is created from sources in packages_reset.php and a file mentioned in package.xml is not there, then
  - show the package name and missing file in error message (from Archive_Tar)
  - take care that a reload of the script still shows the error (currently, it simply builds the package)

Index: Archive.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.package.archive.lib/Archive.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Archive.php	6 May 2004 12:25:29 -0000	1.2
--- Archive.php	17 May 2004 10:25:20 -0000	1.3
***************
*** 108,112 ****
              include_once 'ZZOSS_File/File.php';
              foreach($files as $file){
!                 $tar_list[] = str_replace($wrong_dir_separator,DIRECTORY_SEPARATOR,ZZOSS_File::fixPath($file['@']['name']));
              }
          }
--- 108,117 ----
              include_once 'ZZOSS_File/File.php';
              foreach($files as $file){
!                 $tar_file = str_replace($wrong_dir_separator,DIRECTORY_SEPARATOR,ZZOSS_File::fixPath($file['@']['name']));
!                 if(!file_exists($pkg_src_dir.$tar_file)){
!                     PEAR::raiseError("Error in package XML of '$pkg_unique': file '$tar_file' does not exist (source directory is '$pkg_src_dir').");
!                 } else {
!                     $tar_list[] = $tar_file;
!                 }
              }
          }
***************
*** 136,141 ****
              foreach($plugin_files as $plugin_file){
                  if(!in_array($plugin_file['@']['name'], $plugin_files_processed)){
!                     array_push($plugin_files_processed, $plugin_file['@']['name']);
!                     $tar_list[] = str_replace($wrong_dir_separator,DIRECTORY_SEPARATOR,ZZOSS_File::fixPath($plugin_file['@']['name']));
                  }
              }
--- 141,151 ----
              foreach($plugin_files as $plugin_file){
                  if(!in_array($plugin_file['@']['name'], $plugin_files_processed)){
!                     $tar_file = str_replace($wrong_dir_separator,DIRECTORY_SEPARATOR,ZZOSS_File::fixPath($plugin_file['@']['name']));
!                     if(!file_exists($pkg_src_dir.$tar_file)){
!                         PEAR::raiseError("'$pkg_src_dir$tar_file' does not exist in package '$pkg_unique'");
!                     } else {
!                         array_push($plugin_files_processed, $plugin_file['@']['name']);
!                         $tar_list[] = $tar_file;
!                     }
                  }
              }



-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click