cvs: pecl(BRANCH_1_1_1) /sdo MakePackage.php

From: Date: Wed, 06 Dec 2006 09:45:42 +0000
Subject: cvs: pecl(BRANCH_1_1_1) /sdo MakePackage.php
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-6754@lists.php.net to get a copy of this message
slaws Wed Dec 6 09:45:42 2006 UTC Modified files: (Branch: BRANCH_1_1_1) /pecl/sdo MakePackage.php Log: Test and example reorganization http://cvs.php.net/viewvc.cgi/pecl/sdo/MakePackage.php?r1=1.24&r2=1.24.2.1&diff_format=u Index: pecl/sdo/MakePackage.php diff -u pecl/sdo/MakePackage.php:1.24 pecl/sdo/MakePackage.php:1.24.2.1 --- pecl/sdo/MakePackage.php:1.24 Fri Nov 24 15:32:16 2006 +++ pecl/sdo/MakePackage.php Wed Dec 6 09:45:42 2006 @@ -1,5 +1,5 @@ <?php - /* $Id: MakePackage.php,v 1.24 2006/11/24 15:32:16 cem Exp $ */ + /* $Id: MakePackage.php,v 1.24.2.1 2006/12/06 09:45:42 slaws Exp $ */ require_once('PEAR/PackageFileManager.php'); $packagexml = new PEAR_PackageFileManager; if (PEAR::isError($packagexml)) { @@ -121,7 +121,6 @@ 'build/', 'CVS/', 'include/', - 'interop/', 'modules/', '.project', 'acinclude.m4', @@ -163,10 +162,9 @@ ), 'dir_roles' => array( '/' => 'src', - 'scenarios' => 'test', + 'examples' => 'test', 'tests' => 'test', 'DAS' => 'php', - 'SCA/tests' => 'test', 'SCA' => 'php') ) @@ -242,6 +240,11 @@ // all the lines from package.xml $in_lines = file('package.xml'); + // sometimes we have to ingnore a block of lines from the + // package.xml file listing because it contains an SCA + // directory we don't wan to mode + $ignore_block = false; + // when set true lines are recorded in $sca_buffer. When // set false lines are recorded in $sdo_buffer $sca_buffering = false; @@ -252,9 +255,19 @@ // separate SCA lines from SDO lines foreach ($in_lines as $line) { - // find the start tag of the SCA section and - // start buffering SCA lines - if ( strstr($line, "<dir name=\"SCA\">") ) { + // We have to check that we are not in the examples + // or tests sections as both of these sections have + // SCA directories that we want to leave alone + if ( strstr($line, "<dir name=\"examples\">") || + strstr($line, "<dir name=\"tests\">") ) { + $ignore_block = true; + } + + // find the start tag of an SCA section and + // assuming we aren't ignoring the block + // it appears in start buffering SCA lines + if ( strstr($line, "<dir name=\"SCA\">") && + $ignore_block == false ) { $sca_buffering = true; } @@ -269,6 +282,13 @@ if ( strstr($line, "</dir> <!-- /SCA -->") ) { $sca_buffering = false; } + + // Stop ignoring any SCA directories we see when we + // get to the end of the tests and examples sections + if ( strstr($line, "</dir> <!-- /examples -->") || + strstr($line, "</dir> <!-- /tests -->") ) { + $ignore_block = false; + } } // empty the temporary output file

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