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 852591 - yum does not verify options before taking actions [NEEDINFO]
Summary: yum does not verify options before taking actions
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: Patrik Kis
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-29 02:51 UTC by Subhendu Ghosh
Modified: 2016-10-04 04:31 UTC (History)
5 users (show)

Fixed In Version: yum-3.2.29-31.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-15 14:06:39 UTC
Target Upstream Version:
Embargoed:
james.antill: needinfo?


Attachments (Terms of Use)

Description Subhendu Ghosh 2012-08-29 02:51:32 UTC
Description of problem:
Invoking yum with an incorrect option does not cause yum to error out immediately. 

Version-Release number of selected component (if applicable):
yum-3.2.29-30.el6.noarch

How reproducible:
Always


Steps to Reproduce:
1. yum --disaberepo=* --enablerepo=rhel list available
2.
3.
  
Actual results:
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.

Please use yum-config-manager to configure which software
repositories are used with Red Hat Subscription Management.


Command line error: no such option: --disaberepo

real	0m6.016s
user	0m5.156s
sys	0m0.044s


Expected results:
Immediate error condition for unrecognized options or commands - before the repos are parsed.

Additional info:

Comment 2 James Antill 2012-08-29 16:07:25 UTC
 ACKing.
 Assuming this is: 2853dc82e1c14ce15451a3f184507483fe29e85a aka. BZ 773512.

Comment 5 Patrik Kis 2012-11-14 13:07:03 UTC
Hi James,

I tried to reproduce this issue but I cannot.
When I try to run yum with an incorrect option it quits quite fast no matter if it is the new or old one. There is also no difference in output log.

The problem is that when yum is started with invalid option (like --disaberepo) it exits before the code that was patched starts to be executed. It exists in the beginning of function setupYumConfig with self.parse_args.

I'm confused; am I missing something?

Comment 7 James Antill 2012-11-19 19:34:31 UTC
 Yeh, I assumed that the bug was actually the same as BZ 773512 ... which is that:

yum upodate kernel --enablerepo=updates-testing

...will load the repos. and then tell you there is a failure. AFAIK we have always parsed command line options before repos.

Comment 8 Patrik Kis 2012-11-19 21:15:15 UTC
Unfortunately I'm not able to reproduce the issue reported in this bug.
In my case yum quits instantly, print out the available commands and drops error. So I'm not sure what it was doing so long in your case.
Could you pleas provide the full yum output and also the output of yum-config-manager? Thanks.

Comment 9 Patrik Kis 2012-11-19 21:19:04 UTC
Here is what I get on my system:

# rpm -q yum
yum-3.2.29-30.el6.noarch
#
# time yum --disaberepo=* --enablerepo=rhel6 list available
Loaded plugins: auto-update-debuginfo, refresh-packagekit, security
Usage: yum [options] COMMAND

List of Commands:

check          Check for problems in the rpmdb
check-update   Check for available package updates
clean          Remove cached data
deplist        List a package's dependencies
distribution-synchronization Synchronize installed packages to the latest available versions
downgrade      downgrade a package
erase          Remove a package or packages from your system
groupinfo      Display details about a package group
groupinstall   Install the packages in a group on your system
grouplist      List available package groups
groupremove    Remove the packages in a group from your system
help           Display a helpful usage message
history        Display, or use, the transaction history
info           Display details about a package or group of packages
install        Install a package or packages on your system
list           List a package or groups of packages
load-transaction load a saved transaction from filename
makecache      Generate the metadata cache
provides       Find what package provides the given value
reinstall      reinstall a package
repolist       Display the configured software repositories
resolvedep     Determine which package provides the given dependency
search         Search package details for the given string
shell          Run an interactive yum shell
update         Update a package or packages on your system
update-minimal Works like update, but goes to the 'newest' package match which fixes a problem that affects your system
updateinfo     Acts on repository update information
upgrade        Update packages taking obsoletes into account
version        Display a version for the machine and/or available repos.


Command line error: no such option: --disaberepo

real	0m0.100s
user	0m0.079s
sys	0m0.021s
#

Comment 12 James Antill 2013-04-09 21:47:35 UTC
Still need info. on the original bug, so we can reproduce it.

Comment 13 RHEL Program Management 2013-10-14 04:49:16 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 14 Valentina Mukhamedzhanova 2014-12-15 14:06:39 UTC
As there seems to be no new information on this bug, I'm closing it.


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