This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 448207 - yum groupinstall traceback if group does'nt exist
yum groupinstall traceback if group does'nt exist
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-24 08:32 EDT by Pradeep Kilambi
Modified: 2014-01-21 18:03 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-26 14:19:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Pradeep Kilambi 2008-05-24 08:32:50 EDT
Description of problem:

WHen yum group install a misspealt or unknown group its gives a traceback
instead of a proper error message.

  $ sudo yum groupinstall "KDE (K Desktop Environment"Loaded plugins:
fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * google: dl.google.com
 * livna: mirrors.tummy.com
 * fedora: ftp.linux.ncsu.edu
 * adobe-linux-i386: linuxdownload.adobe.com
 * updates: ftp.linux.ncsu.edu
Setting up Group Process
Loading mirror speeds from cached hostfile
 * google: dl.google.com
 * livna: mirrors.tummy.com
 * fedora: ftp.linux.ncsu.edu
 * adobe-linux-i386: linuxdownload.adobe.com
 * updates: ftp.linux.ncsu.edu
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 241, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 116, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 311, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd,
self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 327, in doCommand
    return base.installGroups(extcmds)
  File "/usr/share/yum-cli/cli.py", line 859, in installGroups
    self.logger.error(_('Warning: Group %s does not exist.'), group_strng)
NameError: global name 'group_strng' is not defined

looks like a typo error. 

here is the patch to fix it:
$ diff -u /usr/share/yum-cli/cli.py.orig /usr/share/yum-cli/cli.py 
--- /usr/share/yum-cli/cli.py.orig	2008-05-24 08:29:20.000000000 -0400
+++ /usr/share/yum-cli/cli.py	2008-05-24 08:29:44.000000000 -0400
@@ -856,7 +856,7 @@
                     pkgs_used.extend(txmbrs)
 
             if not group_matched:
-                self.logger.error(_('Warning: Group %s does not exist.'),
group_strng)
+                self.logger.error(_('Warning: Group %s does not exist.'),
group_string)
                 continue
             
         if not pkgs_used:


Applying the patch:

$ sudo yum groupinstall "KDE (K Desktop Environment"Loaded plugins:
fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * google: dl.google.com
 * livna: mirrors.tummy.com
 * fedora: ftp.linux.ncsu.edu
 * adobe-linux-i386: linuxdownload.adobe.com
 * updates: ftp.linux.ncsu.edu
Setting up Group Process
Loading mirror speeds from cached hostfile
 * google: dl.google.com
 * livna: mirrors.tummy.com
 * fedora: ftp.linux.ncsu.edu
 * adobe-linux-i386: linuxdownload.adobe.com
 * updates: ftp.linux.ncsu.edu
Warning: Group KDE (K Desktop Environment does not exist.
No packages in any requested group available to install or update

gives the right message.

Version-Release number of selected component (if applicable):

$ rpm -q yum
yum-3.2.14-10.fc9.noarch

How reproducible:

always

  
Actual results:

traceback

Expected results:

A proper error message

Additional info:
Comment 1 Seth Vidal 2008-05-26 14:19:10 EDT
It's already been fixed in upstream and in the yum in updates-testing.

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