Ticket #216 (closed defect: fixed)

Opened 3 months ago

Last modified 7 weeks ago

pcheck assumes ebuilds will inherit at least 1 eclass

Reported by: Ford_Prefect Owned by:
Priority: normal Milestone:
Component: pkgcore-checks Version: 0.4.3
Keywords: Cc:

Description

I get the following traceback, which, from my reading of the code, is because of the underlying assumption that at least one eclass will always be inherited by an ebuild. This is not always true - I have a few meta ebuilds that do not inherit anything.

Traceback:

ERROR root: check <pkgcore_checks.visibility.VisibilityReport object at
          : 0x8a09d8c> raised
ERROR root: Traceback (most recent call last):
ERROR root:   File "/usr/lib/python2.5/site-packages/pkgcore_checks/base.py",
          : line 328, in feed
ERROR root:     check.feed(item, reporter)
ERROR root:   File
          : "/usr/lib/python2.5/site-packages/pkgcore_checks/visibility.py",
          : line 105, in feed
ERROR root:     for eclass in pkg.data["_eclasses_"]:
ERROR root:   File "/usr/lib/python2.5/site-packages/snakeoil/obj.py", line
          : 150, in __getitem__
ERROR root:     raise KeyError(key)
ERROR root: KeyError: '_eclasses_'
ERROR root: check <pkgcore_checks.deprecated.DeprecatedEclassReport object at
          : 0x8a0c6ec> raised
ERROR root: Traceback (most recent call last):
ERROR root:   File "/usr/lib/python2.5/site-packages/pkgcore_checks/base.py",
          : line 328, in feed
ERROR root:     check.feed(item, reporter)
ERROR root:   File
          : "/usr/lib/python2.5/site-packages/pkgcore_checks/deprecated.py",
          : line 74, in feed
ERROR root:     bad = self.blacklist.intersection(pkg.data["_eclasses_"])
ERROR root:   File "/usr/lib/python2.5/site-packages/snakeoil/obj.py", line
          : 150, in __getitem__
ERROR root:     raise KeyError(key)
ERROR root: KeyError: '_eclasses_'

Change History

comment:1 Changed 2 months ago by ferringb

That's not actually the case- that key/val should exist even if there aren't any inherited classes.

_eclasses_ is getting consumed somewhere prior which is causing it to go boom.

What's the exact command to trigger this? What checks in particular?

comment:2 Changed 7 weeks ago by ferringb

  • status changed from new to closed
  • resolution set to fixed

fixed via ferringb@…; released shortly.

Note: See TracTickets for help on using tickets.