Bug 448207 - yum groupinstall traceback if group does'nt exist
Summary: yum groupinstall traceback if group does'nt exist
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-24 12:32 UTC by Pradeep Kilambi
Modified: 2014-01-21 23:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-26 18:19:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pradeep Kilambi 2008-05-24 12:32:50 UTC
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 18:19:10 UTC
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.