yum will fail with a traceback if there is an empty line int he environment group file
Issue
- If there is a blank line in the
/var/lib/yum/groups/environmentfile, yum will fail with a traceback:
[root@pmg-rhel7 ~]# vi /var/lib/yum/groups/environment
[root@pmg-rhel7 ~]# yum group info SAP
Loaded plugins: product-id, subscription-manager
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 367, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 160, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 352, in getOptionsConfig
self.parseCommands() # before we return check over the base command + args
File "/usr/share/yum-cli/cli.py", line 396, in parseCommands
self.yum_cli_commands[self.basecmd].doCheck(self, self.basecmd, self.extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 1011, in doCheck
elif not os.path.exists(os.path.dirname(base.igroups.filename)):
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1111, in <lambda>
igroups = property(fget=lambda self: self._getIGroups(),
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1071, in _getIGroups
self._igroups = yum.igroups.InstalledGroups(db_path=pdb_path)
File "/usr/lib/python2.7/site-packages/yum/igroups.py", line 103, in __init__
self._read_grp_grps(db_path)
File "/usr/lib/python2.7/site-packages/yum/igroups.py", line 143, in _read_grp_grps
groups_num = int(_read_str(fo))
ValueError: invalid literal for int() with base 10: ''
[root@pmg-rhel7 ~]#
Environment
- Red Hat Enterprise Linux 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
