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 1332792 - content creator: default value in prompt is not picked on Enter
Summary: content creator: default value in prompt is not picked on Enter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: preupgrade-assistant
Version: 6.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Petr Hracek
QA Contact: Alois Mahdal
URL:
Whiteboard:
Depends On:
Blocks: 1335121
TreeView+ depends on / blocked
 
Reported: 2016-05-04 05:59 UTC by Alois Mahdal
Modified: 2016-11-04 08:57 UTC (History)
9 users (show)

Fixed In Version: preupgrade-assistant-2.1.10-6.el6
Doc Type: Bug Fix
Doc Text:
When the preupg-content-creator utility asks users to select a value and offers them a default value, users can now accept the default value by pressing Enter.
Clone Of:
Environment:
Last Closed: 2016-11-04 08:57:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2616 0 normal SHIPPED_LIVE preupgrade-assistant bug fix and enhancement update 2016-11-03 16:23:38 UTC

Description Alois Mahdal 2016-05-04 05:59:02 UTC
Description of problem
======================

When preupg-content-creator asks if you want to specify description:

    # preupg-content-creator
    Specify a upgrade path (like RHEL6_7) where a content will be stored: MY3_4
    Specify a group name which content belongs to (like database): hello
    Specify a module name which will be created (like mysql): kitty
    Specify a script name which will be used for assessment: (check.sh) 
    Specify a solution file which will be shown in report: (solution.txt) 
    Specify a content title: Kitty
    Would you like to specify a content description? ([y]/n)? 
    You have to type [y]es or [n]o.
    Would you like to specify a content description? ([y]/n)? y
    Write down a content description: 
    [...]

the prompt suggests that 'y' is the default, but does not behave like
that.


Version-Release number of selected component
============================================

preupgrade-assistant-el6toel7-0.6.48-1.el6


How reproducible
================

Always


Steps to Reproduce
==================

 1. run preupg-content-creator
 2. when prompt suggests a default value, don't enter
    anything, just press Enter


Actual results
==============

At some questions, p-c-c will not choose the default value


Expected results
================

p-c-c should always accept the value denoted as default

Comment 5 Alois Mahdal 2016-10-07 23:01:31 UTC
This has been fixed for the 'description', but upstream has added new question which suffers from the same:

    [0 root@qeos-231 ~]# preupg-content-creator 
    Specify the upgrade path (like RHEL6_7) where the module will be stored: RHEL6_7
    Specify the group name which the module belongs to [system]: 
    Specify the module name which will be created [packages]: 
    Would you like to create a BASH or Python check script? [sh/py] Bash is default. 
    Select either 'sh or 'py'.
    Would you like to create a BASH or Python check script? [sh/py] Bash is default. sh
    sh
    Specify the script name which will be used for the assessment: [check.sh] 
    ....

Comment 6 Alois Mahdal 2016-10-07 23:06:30 UTC
Another thing, I have noticed that the Doc text is inacurrate.

This bug is not just about the one question but about the behavior in general; when there is a denoted default value, pressing Enter should mean accepting that value (otherwise there's no point in having a "default" value).

Can you please update the text?

Comment 11 Alois Mahdal 2016-10-12 21:04:27 UTC
Tested with preupgrade-assistant-2.1.10-6.el6.  All options with default values are now correctly applied on Enter:

    [0 root@qeos-29 ~]# preupg-content-creator
    Specify the upgrade path (like RHEL6_7) where the module will be stored: RHEL6_7
    The path RHEL6_7 already exists.
    Do you want to create a module there? [Y/n]? ^C
     Content creation was interrupted by user.

    [0 root@qeos-29 ~]# rm -rf RHEL6_7
    [0 root@qeos-29 ~]# preupg-content-creator
    Specify the upgrade path (like RHEL6_7) where the module will be stored: RHEL6_7
    Specify the group name which the module belongs to [system]: 
    Specify the module name which will be created [packages]: 
    Would you like to create a BASH or Python check script? [sh/py] Bash is default. 
    Specify the script name which will be used for the assessment: [check.sh] 
    Specify the solution file which will be shown in the report: [solution.txt] 
    Specify the module title: haha
    Would you like to specify the module description? [Y/n]? 
    Write the module description: zz
    preupg-content-creator generated these files to be updated:
    - the module was created in the /root/RHEL6_7/system/packages directory.
    - the INI file which defines the module is RHEL6_7/system/packages/packages.ini.
    - the check script which provides an assessment is RHEL6_7/system/packages/check.sh. Update it before you use it.
    - the solution text which informs about incompatilibies is RHEL6_7/system/packages/solution.txt. Update it before you use it.

    For testing content run these two commands:
    - preupg-create-group-xml RHEL6_7/system/packages to create XML file
    - preupg -c RHEL6_7-results/system/packages/all-xccdf.xml
    [0 root@qeos-29 ~]# ll


The actual module content meets expectations as well:

    [0 root@qeos-29 ~]# head RHEL6_7/system/packages/*
    ==> RHEL6_7/system/packages/check.sh <==
    #!/bin/bash

    . /usr/share/preupgrade/common.sh

    #END GENERATED SECTION

    ### For more information see 'man preupg-content-creator' or 'man preupgrade-assistant-api'.


    ==> RHEL6_7/system/packages/packages.ini <==
    [preupgrade]
    check_script = check.sh
    content_description = zz
    solution = solution.txt
    content_title = haha


    ==> RHEL6_7/system/packages/solution.txt <==
    [0 root@qeos-29 ~]#

Comment 13 errata-xmlrpc 2016-11-04 08:57:20 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://rhn.redhat.com/errata/RHBA-2016-2616.html


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