SOURCES: php-pear-PEAR_Command_Packaging.patch - add --output argu...

glen glen at pld-linux.org
Wed Nov 8 20:17:18 CET 2006


Author: glen                         Date: Wed Nov  8 19:17:18 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- add --output argument support

---- Files affected:
SOURCES:
   php-pear-PEAR_Command_Packaging.patch (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SOURCES/php-pear-PEAR_Command_Packaging.patch
diff -u SOURCES/php-pear-PEAR_Command_Packaging.patch:1.4 SOURCES/php-pear-PEAR_Command_Packaging.patch:1.5
--- SOURCES/php-pear-PEAR_Command_Packaging.patch:1.4	Wed Nov  8 20:06:32 2006
+++ SOURCES/php-pear-PEAR_Command_Packaging.patch	Wed Nov  8 20:17:13 2006
@@ -1,6 +1,18 @@
---- ./usr/share/pear/PEAR/Command/Packaging.php	2006-11-08 20:57:35.522937986 +0200
-+++ ./usr/share/pear/PEAR/Command/Packaging.php	2006-11-08 21:05:54.294127778 +0200
-@@ -98,7 +98,7 @@
+--- ./usr/share/pear/PEAR/Command/Packaging.php	2006-11-08 21:05:54.294127778 +0200
++++ ./usr/share/pear/PEAR/Command/Packaging.php	2006-11-08 21:12:50.723466165 +0200
+@@ -54,6 +54,11 @@
+                     'arg' => 'FILE',
+                     'doc' => 'Use FILE as RPM spec file template'
+                     ),
++                'output' => array(
++                    'shortopt' => 'o',
++                    'arg' => 'FILE',
++                    'doc' => 'Use FILE as output filename'
++                    ),
+                 'rpm-release' => array(
+                     'shortopt' => 'r',
+                     'arg' => 'RELEASE',
+@@ -98,7 +103,7 @@
      var $output;
      
      // The default format of the RPM package name
@@ -9,7 +21,7 @@
      
      // The default format of various dependencies that might be generated in the
      // spec file.
-@@ -113,7 +113,7 @@
+@@ -113,7 +118,7 @@
      // the rpm-pkgname format string, with the addition of:
      // %v = package version
      // %P = use the same as whatever rpm_pkgname_format is set to be
@@ -18,7 +30,7 @@
  
      /**
       * PEAR_Command_Packaging constructor.
-@@ -172,7 +172,8 @@
+@@ -172,7 +177,8 @@
          }
          $reg = &$this->config->getRegistry();
          $pkg = &$this->getPackageFile($this->config, $this->_debug);
@@ -28,7 +40,7 @@
          if (PEAR::isError($pf)) {
              $u = $pf->getUserinfo();
              if (is_array($u)) {
-@@ -219,6 +220,10 @@
+@@ -219,6 +225,10 @@
          } else {
              $info['release'] = '1';
          }
@@ -39,7 +51,7 @@
          
          // Work out the alias for the channel that this package is in
          $info['possible_channel'] = '';
-@@ -234,17 +239,19 @@
+@@ -234,17 +244,19 @@
          $info['doc_files'] = array();
          $info['doc_files_relocation_script'] = '';
          $info['doc_files_statement'] = '';
@@ -62,7 +74,7 @@
          }
          
          $srcfiles = 0;
-@@ -253,44 +260,49 @@
+@@ -253,44 +265,49 @@
                  continue;
              }
              $name = preg_replace('![/:\\\\]!', '/', $name);
@@ -149,7 +161,7 @@
          }
          
          $ndocs = count($info['doc_files']);
-@@ -305,6 +317,12 @@
+@@ -305,6 +322,12 @@
              $info['doc_files_statement'] = '%doc ' . $info['doc_files'];
              $info['doc_files_relocation_script'] = "mv %{buildroot}/docs .\n";
          }
@@ -162,7 +174,7 @@
          
          if ($srcfiles > 0) {
              require_once 'OS/Guess.php';
-@@ -332,11 +350,27 @@
+@@ -332,11 +355,27 @@
          $info['version'] = $pf->getVersion();
          $info['release_license'] = $pf->getLicense();
          $info['release_state'] = $pf->getState();
@@ -190,7 +202,7 @@
                          continue;
                      }
                      
-@@ -368,6 +402,13 @@
+@@ -368,6 +407,13 @@
                          'le' => '<=',
                          'eq' => '=',
                      );
@@ -204,7 +216,7 @@
                      if ($dep['rel'] == 'has') {
                          // We use $package as the index to the $requires array to de-duplicate deps.
                          // Note that in the case of duplicate deps, versioned deps will "win" - see several lines down.
-@@ -375,16 +416,22 @@
+@@ -375,16 +421,22 @@
                      } elseif ($dep['rel'] == 'not') {
                          $conflicts[] = $package;
                      } elseif ($dep['rel'] == 'ne') {
@@ -231,7 +243,7 @@
                  }
              } else {
                  $info['package2xml'] = '2'; // tell the spec to use package2.xml
-@@ -515,18 +562,60 @@
+@@ -515,18 +567,60 @@
                          $requires[$info['pear_rpm_name']] = $info['pear_rpm_name'] . ' >= ' .
                              $deps['required']['pearinstaller']['min'];
                      }
@@ -300,3 +312,18 @@
          if (function_exists('file_get_contents')) {
              fclose($fp);
              $spec_contents = preg_replace('/@([a-z0-9_-]+)@/e', '$info["\1"]',
+@@ -536,7 +630,13 @@
+                 fread($fp, filesize($spec_template)));
+             fclose($fp);
+         }
+-        $spec_file = $this->_getRPMNameFromFormat($this->_rpm_specname_format, $pf->getPackage(), $alias, $info['version']);
++
++        if (isset($options['output'])) {
++			$spec_file = $options['output'];
++        } else {
++			$spec_file = $this->_getRPMNameFromFormat($this->_rpm_specname_format, $pf->getPackage(), $alias, $info['version']);
++        }
++
+         $wp = fopen($spec_file, "wb");
+         if (!$wp) {
+             return $this->raiseError("could not write RPM spec file $spec_file: $php_errormsg");
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/php-pear-PEAR_Command_Packaging.patch?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list