Skip to content

Commit

Permalink
Merge pull request #38 from redhat-performance/fix_install
Browse files Browse the repository at this point in the history
Getting package failures, be a bit smarter about things.
  • Loading branch information
dvalinrh authored Aug 6, 2024
2 parents 8a2f5b1 + 2d82b56 commit 2b4bf2e
Showing 1 changed file with 8 additions and 25 deletions.
33 changes: 8 additions & 25 deletions phoronix/run_phoronix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,33 +119,16 @@ if [ $show_usage -eq 1 ]; then
fi

test_tools/package_tool --update
test_tools/package_tool --packages php73-cli.x86_64,php73-common.x86_64,php73-xml.x86_64
if [[ $? != "0" ]]; then
#
# Check to see if we need to remove the old php
#
test_tools/package_tool --is_installed php-cli.x86_64
if [ $? -eq 0 ]; then
packages="php-cli.x86_64 php-common.x86_64 php-xml.x86_64"
#
# Remove and add the proper php
#
test_tools/package_tool --remove_packages $packages
if [ $? -ne 0 ]; then
error_out "Failed to remove $packages" 1
fi
for pkg in cli common php; do
package=`dnf list | grep php | grep $pkg | awk '{print $1}'`
if [[ $package == "" ]]; then
error_out "Did not find a php $pkg package" 1
fi
test_tools/package_tool --packages php73-cli.x86_64,php73-common.x86_64,php73-xml.x86_64
if [ $? -ne 0 ]; then
#
# Just to be difficult Amazon 2 uses even different packages.
#
test_tools/package_tool --packages git,php-cli,php-xml,php-json
if [ $? -ne 0 ]; then
error_out "Failed to install $packages" 1
fi
test_tools/package_tool --packages $package
if [[ $? != "0" ]]; then
error_out "Failed to install one or more $php_cli,$php_common,$php_xml" 1
fi
fi
done

# Variables set by general setup.
#
Expand Down

0 comments on commit 2b4bf2e

Please sign in to comment.