summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-12-13 11:22:13 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-12-13 11:22:13 -0500
commit7b5b1441308ed01a159e3878c4a55fe86ea50a9e (patch)
tree0a9e45f5b99e4a4d10a33f453b58e0076ac4a982
parent83c97949686445f0e90aea6e9088e4dbfa54e541 (diff)
downloadphoronix-test-suite-upstream-7b5b1441308ed01a159e3878c4a55fe86ea50a9e.tar.gz
phoronix-test-suite-upstream-7b5b1441308ed01a159e3878c4a55fe86ea50a9e.tar.xz
phoronix-test-suite-upstream-7b5b1441308ed01a159e3878c4a55fe86ea50a9e.zip
pts-core: Add support for abstracting the package vendor identifier
(should fix OpenSuSE External Dependencies support on 11.1)
-rw-r--r--CHANGE-LOG1
-rw-r--r--pts-core/functions/pts-functions-install_dependencies.php23
2 files changed, 21 insertions, 3 deletions
diff --git a/CHANGE-LOG b/CHANGE-LOG
index 67efb8a..ad28a17 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -10,6 +10,7 @@ Phoronix Test Suite (Git)
- pts-core: Add pts_suite_tandem_XmlReader() object for providing pts_location_suite() in the constructor
- pts-core: Add pts_results_tandem_XmlReader() object for providing file handling in the constructor
- pts-core: Ensure no spaces in pts_vendor_identifier()
+- pts-core: Add support for abstracting the package vendor identifier (should fix OpenSuSE External Dependencies support on 11.1)
- pts: Add more tests to netbook suite
Phoronix Test Suite 1.6.0 Alpha 3
diff --git a/pts-core/functions/pts-functions-install_dependencies.php b/pts-core/functions/pts-functions-install_dependencies.php
index 562c91d..f7ead7a 100644
--- a/pts-core/functions/pts-functions-install_dependencies.php
+++ b/pts-core/functions/pts-functions-install_dependencies.php
@@ -21,6 +21,23 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+function pts_package_vendor_identifier()
+{
+ $vendor = pts_vendor_identifier();
+
+ if(!is_file(XML_DISTRO_DIR . $vendor . "-packages.xml") && !is_file(SCRIPT_DISTRO_DIR . "install-" . $vendor . "-packages.sh"))
+ {
+ // TODO: Move this out to an XML file instead of hard-coding the "links"
+ switch($vendor)
+ {
+ case "suselinux":
+ $vendor = "opensuse";
+ break;
+ }
+ }
+
+ return $vendor;
+}
function pts_install_package_on_distribution($identifiers)
{
// PTS External Dependencies install on distribution
@@ -153,7 +170,7 @@ function pts_install_external_dependencies_list($identifier, &$INSTALL_OBJ)
function pts_package_generic_to_distro_name(&$package_install_array, $generic_names)
{
// Generic name to distribution package name
- $vendor = pts_vendor_identifier();
+ $vendor = pts_package_vendor_identifier();
$generated = false;
if(is_file(XML_DISTRO_DIR . $vendor . "-packages.xml"))
@@ -201,9 +218,9 @@ function pts_install_packages_on_distribution_process($install_objects)
$install_objects = implode(" ", $install_objects);
}
- $distribution = pts_vendor_identifier();
+ $distribution = pts_package_vendor_identifier();
- if(is_file(SCRIPT_DISTRO_DIR . "install-" . $distribution . "-packages.sh") || is_link(SCRIPT_DISTRO_DIR . "install-" . $distribution . "-packages.sh"))
+ if(is_file(SCRIPT_DISTRO_DIR . "install-" . $distribution . "-packages.sh"))
{
echo "\nThe following dependencies will be installed: \n";