Revert "Intermediate components work"
authorGunnar Wrobel <p@rdus.de>
Thu, 23 Sep 2010 19:18:55 +0000 (21:18 +0200)
committerGunnar Wrobel <p@rdus.de>
Thu, 23 Sep 2010 19:18:55 +0000 (21:18 +0200)
This reverts commit 01291d9dd62bc076e39ac39cbe15ea2e0ff33156.

Don't know how I managed to commit this but it was not intended for pushing yet.

components/lib/Components/Dependencies.php
components/lib/Components/Dependencies/Injector.php
components/lib/Components/Module/Distribute.php [deleted file]
components/lib/Components/Pear/InstallLocation.php
components/lib/Components/Pear/Package.php [deleted file]
components/lib/Components/Runner/Distribute.php [deleted file]
components/package.xml
components/test/Components/StoryTestCase.php

index 1e60e12..229f907 100644 (file)
 interface Components_Dependencies
 {
     /**
-     * Returns the distribution handler for a package.
-     *
-     * @return Components_Runner_Distribute The distribution handler.
-     */
-    public function getRunnerDistribute();
-
-    /**
      * Returns the installer for a package.
      *
      * @return Components_Runner_Installer The installer.
index 2a749b0..0cc4ca6 100644 (file)
@@ -43,16 +43,6 @@ implements Components_Dependencies
     }
 
     /**
-     * Returns the distribution handler for a package.
-     *
-     * @return Components_Runner_Distribute The distribution handler.
-     */
-    public function getRunnerDistribute()
-    {
-        return $this->getInstance('Components_Runner_Distribute');
-    }
-
-    /**
      * Returns the installer for a package.
      *
      * @return Components_Runner_Installer The installer.
diff --git a/components/lib/Components/Module/Distribute.php b/components/lib/Components/Module/Distribute.php
deleted file mode 100644 (file)
index c60f32f..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-/**
- * Components_Module_Distribute:: prepares a distribution package for a
- * component.
- *
- * PHP version 5
- *
- * @category Horde
- * @package  Components
- * @author   Gunnar Wrobel <wrobel@pardus.de>
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Components
- */
-
-/**
- * Components_Module_Distribute:: prepares a distribution package for a
- * component.
- *
- * Copyright 2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @category Horde
- * @package  Components
- * @author   Gunnar Wrobel <wrobel@pardus.de>
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Components
- */
-class Components_Module_Distribute
-extends Components_Module_Base
-{
-    /**
-     * Return the title for the option group representing this module.
-     *
-     * @return string The group title.
-     */
-    public function getOptionGroupTitle()
-    {
-        return 'Distribute';
-    }
-
-    /**
-     * Return the description for the option group representing this module.
-     *
-     * @return string The group description.
-     */
-    public function getOptionGroupDescription()
-    {
-        return 'This module prepares a distribution package (e.g. RPM, APT, Ebuild, ...) from a component.';
-    }
-
-    /**
-     * Return the options for this module.
-     *
-     * @return array The group options.
-     */
-    public function getOptionGroupOptions()
-    {
-        return array(
-            new Horde_Argv_Option(
-                '-D',
-                '--distribute',
-                array(
-                    'action' => 'store',
-                    'help'   => 'Prepare the component package in the specified DISTRIBUTE location'
-                )
-            ),
-            new Horde_Argv_Option(
-                '-t',
-                '--template',
-                array(
-                    'action' => 'store',
-                    'help'   => 'Location of a template that will be rewritten into the final package definition.'
-                )
-            ),
-        );
-    }
-
-    /**
-     * Determine if this module should act. Run all required actions if it has
-     * been instructed to do so.
-     *
-     * @return NULL
-     */
-    public function handle(Components_Config $config)
-    {
-        $options = $config->getOptions();
-        if (!empty($options['distribute'])) {
-            $this->_dependencies->getRunnerDistribute()->run();
-        }
-    }
-}
index 86d9111..e036690 100644 (file)
@@ -170,9 +170,6 @@ class Components_Pear_InstallLocation
         if (!file_exists($this->_config_file)) {
             $this->createPearConfig();
         }
-        if (!isset($GLOBALS['_PEAR_Config_instance'])) {
-            $GLOBALS['_PEAR_Config_instance'] = false;
-        }
         return PEAR_Config::singleton($this->_config_file);
     }
 
diff --git a/components/lib/Components/Pear/Package.php b/components/lib/Components/Pear/Package.php
deleted file mode 100644 (file)
index 2e5301d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/**
- * Components_Pear_Package:: provides package handling mechanisms.
- *
- * PHP version 5
- *
- * @category Horde
- * @package  Components
- * @author   Gunnar Wrobel <wrobel@pardus.de>
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Components
- */
-
-/**
- * Components_Pear_Package:: provides package handling mechanisms.
- *
- * Copyright 2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @category Horde
- * @package  Components
- * @author   Gunnar Wrobel <wrobel@pardus.de>
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Components
- */
-class Components_Pear_Package
-{
-    /**
-     * The output handler.
-     *
-     * @param Component_Output
-     */
-    private $_output;
-
-    /**
-     * The package representation.
-     *
-     * @param PEAR_PackageFile_v2
-     */
-    private $_package;
-
-    /**
-     * Constructor.
-     *
-     * @param Component_Output $output The output handler.
-     */
-    public function __construct(Components_Output $output)
-    {
-        $this->_output = $output;
-    }
-
-    /**
-     * Define the package to work on.
-     *
-     * @param string $package_xml_patch Path to the package.xml file.
-     *
-     * @return NULL
-     */
-    public function setPackage($package_xml_path)
-    {
-    }
-}
diff --git a/components/lib/Components/Runner/Distribute.php b/components/lib/Components/Runner/Distribute.php
deleted file mode 100644 (file)
index f2b5faa..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/**
- * Components_Runner_Distribute:: prepares a distribution package for a
- * component.
- *
- * PHP version 5
- *
- * @category Horde
- * @package  Components
- * @author   Gunnar Wrobel <wrobel@pardus.de>
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Components
- */
-
-/**
- * Components_Runner_Distribute:: prepares a distribution package for a
- * component.
- *
- * Copyright 2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @category Horde
- * @package  Components
- * @author   Gunnar Wrobel <wrobel@pardus.de>
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Components
- */
-class Components_Module_Installer
-{
-    /**
-     * The configuration for the current job.
-     *
-     * @var Components_Config
-     */
-    private $_config;
-
-    /**
-     * The package handler.
-     *
-     * @var Components_Pear_Package
-     */
-    private $_package;
-
-    /**
-     * Constructor.
-     *
-     * @param Components_Config       $config  The configuration for the current job.
-     * @param Components_Pear_Package $package Package handler.
-     */
-    public function __construct(
-        Components_Config $config,
-        Components_Pear_Package $package
-    ) {
-        $this->_config  = $config;
-        $this->_package = $package;
-    }
-
-    public function run()
-    {
-        $options = $this->_config->getOptions();
-        $arguments = $this->_config->getArguments();
-        $location = realpath($options['distribute']);
-
-    }
-}
index df21513..14c4f05 100644 (file)
@@ -57,7 +57,6 @@
       <file name="Base.php" role="php" />
       <file name="CiSetup.php" role="php" />
       <file name="DevPackage.php" role="php" />
-      <file name="Distribute.php" role="php" />
       <file name="Installer.php" role="php" />
       <file name="PearPackageXml.php" role="php" />
      </dir> <!-- /lib/Components/Module -->
    <install as="Components/Module/Base.php" name="lib/Components/Module/Base.php" />
    <install as="Components/Module/CiSetup.php" name="lib/Components/Module/CiSetup.php" />
    <install as="Components/Module/DevPackage.php" name="lib/Components/Module/DevPackage.php" />
-   <install as="Components/Module/Distribute.php" name="lib/Components/Module/Distribute.php" />
    <install as="Components/Module/Installer.php" name="lib/Components/Module/Installer.php" />
    <install as="Components/Module/PearPackageXml.php" name="lib/Components/Module/PearPackageXml.php" />
    <install as="Components/Pear/InstallLocation.php" name="lib/Components/Pear/InstallLocation.php" />
index a3937fb..01fd6a2 100644 (file)
@@ -99,7 +99,6 @@ extends PHPUnit_Extensions_Story_TestCase
         case 'calling the package with the install option and a Horde element':
             $_SERVER['argv'] = array(
                 'horde-components',
-                '--channelxmlpath=' . dirname(__FILE__) . '/fixture/channels',
                 '--install=' . $this->_getTemporaryDirectory(),
                 dirname(__FILE__) . '/../../'
             );