diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-12-13 11:22:13 -0500 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-12-13 11:22:13 -0500 |
commit | 7b5b1441308ed01a159e3878c4a55fe86ea50a9e (patch) | |
tree | 0a9e45f5b99e4a4d10a33f453b58e0076ac4a982 /pts-core | |
parent | 83c97949686445f0e90aea6e9088e4dbfa54e541 (diff) | |
download | phoronix-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)
Diffstat (limited to 'pts-core')
-rw-r--r-- | pts-core/functions/pts-functions-install_dependencies.php | 23 |
1 files changed, 20 insertions, 3 deletions
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"; |