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.
Bug 1414556 - After upgrading from RHEL 6 to 7, results.html says to run a script against an rpm list. The script does not work.
Summary: After upgrading from RHEL 6 to 7, results.html says to run a script against a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: preupgrade-assistant-el6toel7
Version: 6.8
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Petr Stodulka
QA Contact: Tereza Cerna
URL:
Whiteboard:
Depends On:
Blocks: 1429926
TreeView+ depends on / blocked
 
Reported: 2017-01-18 20:23 UTC by jcastran
Modified: 2020-05-14 15:33 UTC (History)
5 users (show)

Fixed In Version: preupgrade-assistant-el6toel7-0.6.68-1.el6
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-08-02 00:09:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2400 0 normal SHIPPED_LIVE preupgrade-assistant-el6toel7 bug fix and enhancement update 2017-08-01 22:04:03 UTC

Description jcastran 2017-01-18 20:23:53 UTC
Description of problem:
After upgrading from RHEL 6 to 7, results.html says to run
   /root/preupgrade/noauto_postupgrade.d/install_rpmlist.sh /root/preupgrade/kickstart/RHRHEL7rpmlist_replaced-notbase

The install_rpmlist.sh does not read the formatting correctly and no packages are installed or replaced. (This script is meant to install packages that did not get updated during the update)

Version-Release number of selected component (if applicable):
redhat-upgrade-tool
preupgrade-assistant
preupgrade-assistant-ui
preupgrade-assistant-el6toel7

How reproducible:
Everytime

Steps to Reproduce:
1. Upgrade RHEL 6 to RHEL 7 https://access.redhat.com/solutions/637583
2. Once booted into RHEL 7, enable the optional repository
3. run "/root/preupgrade/noauto_postupgrade.d/install_rpmlist.sh /root/preupgrade/kickstart/RHRHEL7rpmlist_replaced-notbase"


Actual results:
This:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# old-package|required-by-pkgs|replaced-by-pkgs|repo-id
db4-cxx||libdb-cxx|rhel-7-server-optional-rpms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Is translated into:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
db4-cxx||libdb-cxx|rhel-7-server-optional-rpms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Which yum fails with 
   no package "#" exists
   no package "db4-cxx||libdb-cxx|rhel-7-server-optional-rpms" exists

Expected results:
   The script would translate correctly and install libdb-cxx


Additional info:
The script originally says:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  pkgs="$(echo $line | cut -d " " -f1 | tr "," " ")"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If I change the delimiter to "|" and cut the third field, the update will continue.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  pkgs="$(echo $line | cut -d "|" -f3 | tr "," " ")"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The only thing I couldn't think of was how to cut off the first line (its just informational and yum has "can't install "new_pkg"" which is just the column title

Comment 2 Petr Stodulka 2017-02-06 16:45:44 UTC
Thanks for report. I thought that I fix it in the past. Obviously I have forgotten to fix it. Probably it will be fixed in next cycle (in date of RHEL 7.4 GA).

Comment 3 Petr Stodulka 2017-02-06 16:57:23 UTC
(In reply to jcastran from comment #0)
> If I change the delimiter to "|" and cut the third field, the update will
> continue.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   pkgs="$(echo $line | cut -d "|" -f3 | tr "," " ")"
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> The only thing I couldn't think of was how to cut off the first line (its
> just informational and yum has "can't install "new_pkg"" which is just the
> column title

You can add line with grep to skip the comment line before line you mentioned.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  echo "$line" | grep -q "^#" && continue
  pkgs="$(echo $line | cut -d "|" -f3 | tr "," " ")"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I remember that there was one another problem yet, but can't get it now. I will post patch here when I will look at it. In addition, the script is really slow, when you have a lot of packages. So I want to improve it much more. The fix is not urgent, because user don't have to use this script, but can install all packages manually - as it was only possible way before and with own parsing, it can be much faster now.

Comment 8 Tereza Cerna 2017-07-04 10:33:54 UTC
==============================================================
Verified in:
    preupgrade-assistant-2.4.1-1.el6.noarch
    preupgrade-assistant-el6toel7-0.6.70-2.el6.noarch
    preupgrade-assistant-el6toel7-data-0.20170620-1.el6.noarch
PASS
==============================================================

>> Patch was checked and applied.

# rpm -q libdb-cxx
package libdb-cxx is not installed

>> Upgrade machine to RHEL-7

# cd /root/preupgrade/noauto_postupgrade.d/
# ./install_rpmlist.sh  /root/preupgrade/kickstart/RHRHEL7rpmlist_replaced-notbase 
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
redhat-upgrade-cmdline-instrepo                                                   | 4.1 kB  00:00:00     
redhat-upgrade-optional                                                           | 3.8 kB  00:00:00     
Package m17n-db-extras-1.6.4-3.el7.noarch already installed and latest version
Nothing to do
Info: all packages have been installed successfully.

# yum install libdb-cxx
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Package libdb-cxx-5.3.21-20.el7.x86_64 already installed and latest version
Nothing to do

==============================================================
Reproduced in:
    preupgrade-assistant-2.3.3-2.el6.noarch
    preupgrade-assistant-el6toel7-0.6.66-3.el6.noarch
    preupgrade-assistant-el6toel7-data-0.20170218-1.el6.noarch
FAIL
==============================================================

# rpm -q libdb-cxx
package libdb-cxx is not installed

>> Upgrade machine to RHEL-7

# cd /root/preupgrade/noauto_postupgrade.d/
# ./install_rpmlist.sh /root/preupgrade/kickstart/RHRHEL7rpmlist_replaced-notbase
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
redhat-upgrade-cmdline-instrepo                                                   | 4.1 kB  00:00:00     
redhat-upgrade-optional                                                           | 3.8 kB  00:00:00     
No package # available.
Error: Nothing to do
Error: The packages [#] were not installed.
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
No package db4-cxx||libdb-cxx|rhel-7-server-optional-rpms available.
Error: Nothing to do
Error: The packages [db4-cxx||libdb-cxx|rhel-7-server-optional-rpms] were not installed.
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
No package m17n-db-datafiles||m17n-db-extras|rhel-7-server-optional-rpms available.
Error: Nothing to do
Error: The packages [m17n-db-datafiles||m17n-db-extras|rhel-7-server-optional-rpms] were not installed.

# rpm -q install libdb-cxx
package install is not installed
libdb-cxx-5.3.21-19.el7.x86_64

Comment 10 errata-xmlrpc 2017-08-02 00:09:16 UTC
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://access.redhat.com/errata/RHBA-2017:2400


Note You need to log in before you can comment on or make changes to this bug.