Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem
======================
Syntax errors are in common.sh:
/usr/share/preupgrade/common.sh: line 226: syntax error near unexpected token `}'
/usr/share/preupgrade/common.sh: line 226: `}'
/usr/share/premigrate/common.sh: line 226: syntax error near unexpected token `}'
/usr/share/premigrate/common.sh: line 226: `}'
This is apparently caused by two bad `if` calls near the top of the
`check_rpm_to()` function:
check_rpm_to()
{
local RPM=1
local BINARY=1
local RPM_NAME=$1
local BINARY_NAME=$2
local NOT_APPLICABLE=0
if [ -z "$1" ] && RPM=0
if [ -z "$2" ] && BINARY=0
if [ $RPM -eq 1 ]; then
RPM_NAME=$(echo "$RPM_NAME" | tr "," " ")
for pkg in $RPM_NAME
do
grep "^$pkg[[:space:]]" $VALUE_RPM_QA > /dev/null
if [ $? -ne 0 ]; then
log_high_risk "Package $pkg is not installed"
NOT_APPLICABLE=1
fi
done
fi
if [ $BINARY -eq 1 ]; then
BINARY_NAME=$(echo "$BINARY_NAME" | tr "," " ")
for bin in $BINARY_NAME
do
which $bin > /dev/null 2>&1
if [ $? -ne 0 ]; then
log_high_risk "Binary $bin is not installed"
NOT_APPLICABLE=1
fi
done
fi
if [ $NOT_APPLICABLE -eq 1 ]; then
exit_fail
fi
}
Version-Release number of selected component
============================================
preupgrade-assistant-2.1.4-9.el6.noarch
How reproducible
================
Always
Steps to Reproduce
==================
1. Call
bash -n /usr/share/preupgrade/common.sh
bash -n /usr/share/premigrate/common.sh
2. Check output
Actual results
==============
Syntax error
Expected results
================
No errors
Additional info
===============
At this moment, it's also present in upstream repo (228c64c).
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-1022.html
Description of problem ====================== Syntax errors are in common.sh: /usr/share/preupgrade/common.sh: line 226: syntax error near unexpected token `}' /usr/share/preupgrade/common.sh: line 226: `}' /usr/share/premigrate/common.sh: line 226: syntax error near unexpected token `}' /usr/share/premigrate/common.sh: line 226: `}' This is apparently caused by two bad `if` calls near the top of the `check_rpm_to()` function: check_rpm_to() { local RPM=1 local BINARY=1 local RPM_NAME=$1 local BINARY_NAME=$2 local NOT_APPLICABLE=0 if [ -z "$1" ] && RPM=0 if [ -z "$2" ] && BINARY=0 if [ $RPM -eq 1 ]; then RPM_NAME=$(echo "$RPM_NAME" | tr "," " ") for pkg in $RPM_NAME do grep "^$pkg[[:space:]]" $VALUE_RPM_QA > /dev/null if [ $? -ne 0 ]; then log_high_risk "Package $pkg is not installed" NOT_APPLICABLE=1 fi done fi if [ $BINARY -eq 1 ]; then BINARY_NAME=$(echo "$BINARY_NAME" | tr "," " ") for bin in $BINARY_NAME do which $bin > /dev/null 2>&1 if [ $? -ne 0 ]; then log_high_risk "Binary $bin is not installed" NOT_APPLICABLE=1 fi done fi if [ $NOT_APPLICABLE -eq 1 ]; then exit_fail fi } Version-Release number of selected component ============================================ preupgrade-assistant-2.1.4-9.el6.noarch How reproducible ================ Always Steps to Reproduce ================== 1. Call bash -n /usr/share/preupgrade/common.sh bash -n /usr/share/premigrate/common.sh 2. Check output Actual results ============== Syntax error Expected results ================ No errors Additional info =============== At this moment, it's also present in upstream repo (228c64c).