From 0b052a8eaa1ce6936c44ef2740cef9d62959ffa1 Mon Sep 17 00:00:00 2001
From: Gunnar Wrobel
Date: Thu, 23 Sep 2010 21:18:55 +0200
Subject: [PATCH] Revert "Intermediate components work"
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 | 7 --
.../lib/Components/Dependencies/Injector.php | 10 ---
components/lib/Components/Module/Distribute.php | 93 ----------------------
components/lib/Components/Pear/InstallLocation.php | 3 -
components/lib/Components/Pear/Package.php | 64 ---------------
components/lib/Components/Runner/Distribute.php | 67 ----------------
components/package.xml | 2 -
components/test/Components/StoryTestCase.php | 1 -
8 files changed, 247 deletions(-)
delete mode 100644 components/lib/Components/Module/Distribute.php
delete mode 100644 components/lib/Components/Pear/Package.php
delete mode 100644 components/lib/Components/Runner/Distribute.php
diff --git a/components/lib/Components/Dependencies.php b/components/lib/Components/Dependencies.php
index 1e60e126e..229f907f9 100644
--- a/components/lib/Components/Dependencies.php
+++ b/components/lib/Components/Dependencies.php
@@ -30,13 +30,6 @@
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.
diff --git a/components/lib/Components/Dependencies/Injector.php b/components/lib/Components/Dependencies/Injector.php
index 2a749b0ac..0cc4ca64e 100644
--- a/components/lib/Components/Dependencies/Injector.php
+++ b/components/lib/Components/Dependencies/Injector.php
@@ -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
index c60f32f4c..000000000
--- a/components/lib/Components/Module/Distribute.php
+++ /dev/null
@@ -1,93 +0,0 @@
-
- * @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
- * @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();
- }
- }
-}
diff --git a/components/lib/Components/Pear/InstallLocation.php b/components/lib/Components/Pear/InstallLocation.php
index 86d91113c..e036690ee 100644
--- a/components/lib/Components/Pear/InstallLocation.php
+++ b/components/lib/Components/Pear/InstallLocation.php
@@ -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
index 2e5301d2b..000000000
--- a/components/lib/Components/Pear/Package.php
+++ /dev/null
@@ -1,64 +0,0 @@
-
- * @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
- * @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
index f2b5faa8e..000000000
--- a/components/lib/Components/Runner/Distribute.php
+++ /dev/null
@@ -1,67 +0,0 @@
-
- * @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
- * @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']);
-
- }
-}
diff --git a/components/package.xml b/components/package.xml
index df21513a7..14c4f057f 100644
--- a/components/package.xml
+++ b/components/package.xml
@@ -57,7 +57,6 @@
-
@@ -170,7 +169,6 @@
-
diff --git a/components/test/Components/StoryTestCase.php b/components/test/Components/StoryTestCase.php
index a3937fbdd..01fd6a228 100644
--- a/components/test/Components/StoryTestCase.php
+++ b/components/test/Components/StoryTestCase.php
@@ -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__) . '/../../'
);
--
2.11.0