Can we add: import os def _term_width(): """ Simple terminal width, limit to 20 chars. and make 0 == 80. """ if not hasattr(urlgrabber.progress, 'terminal_width_cached'): return 80 ret = urlgrabber.progress.terminal_width_cached() if ret == 0: return 80 if ret < 20: return 20 + if os.environ.get("YUM_WIDTH") > 0: + return int(os.environ.get("YUM_WIDTH")) return ret To the /usr/share/yum-cli/output.py file. When I do yum list > /tmp/yum_mylist.list the column width goes to 80. I want to be able to set it. I'm not a python programmer so the above was just a quick hack.
You almost certainly want to use: repoquery --installed -a --qf '%{ui_nevra} %{ui_from_repo}' ...instead of grepping yum output.