Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 677194 - app-portage/portpeek: crash while parsing package.use
Summary: app-portage/portpeek: crash while parsing package.use
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Pagano
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-03 15:14 UTC by Michael Orlitzky
Modified: 2019-02-03 18:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Orlitzky gentoo-dev 2019-02-03 15:14:23 UTC
I get the following crash while running portpeek, with the latest v2.1.27 and also a few earlier versions:

  $ portpeek --all
  ...
  package.use:
  Traceback (most recent call last):
    File "/usr/lib/python-exec/python3.6/portpeek", line 1585, in <module>
      get_recursive_info(USER_CONFIG_PATH + "/package.use")
    File "/usr/lib/python-exec/python3.6/portpeek", line 434, in 
    get_recursive_info
      get_info(filename)
    File "/usr/lib/python-exec/python3.6/portpeek", line 469, in get_info
      diffs_found = parse_package_use(line,filename)
    File "/usr/lib/python-exec/python3.6/portpeek", line 628, in 
    parse_package_use
      check_useflags_all_versions(pkgs, line, check_pkg)
    File "/usr/lib/python-exec/python3.6/portpeek", line 1072, in 
    check_useflags_all_versions
      if item[0] in atom:
  IndexError: string index out of range

The good news is, I've tracked it down to the following entry in my package.use:

  media-fonts/font-bh-lucidatypewriter-100dpi X

Commenting that line makes everything work. Running with --debug shows that we get an empty iuse item thanks to an empty iuse_string, which is returned by package.use() on line 1048 in my installed copy of portpeek.
Comment 1 Mike Pagano gentoo-dev 2019-02-03 15:59:22 UTC
Hmm.

I can't reproduce with media-fonts/font-bh-lucidatypewriter-100dpi installed or not installed.

But I am using python 3.7.

Just to check, is media-fonts/font-bh-lucidatypewriter-100dpi installed ?
Comment 2 Michael Orlitzky gentoo-dev 2019-02-03 18:09:36 UTC
It was installed, but on a hunch I reinstalled it. And now, everything is fine. Obviously not portpeek's fault... sorry for the noise =)