pkginfo picks random package if multiple package with the same prefix are installes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pkginfo |
Confirmed
|
Undecided
|
Tres Seaver |
Bug Description
I'm trying to use pkginfo to retrive infos about some installed Packages.
e.g. these packages are installed
pyramid 2.0
pyramid-chameleon 0.3
pyramid-
pyramid-deform 0.2
pyramid-layout 1.0.1
pyramid-mailer 0.15.1.1
pyramid-mako 1.1.0
pyramid-mytum 0.17.5
pyramid-retry 2.1.1
pyramid-
pyramid-tm 2.5
pyramid-utilities 0.9.2
when in try to get information about pyramid-chameleon everything works fine.
When in want some information about pyramid, pkg returns one of the other packages.
the problem is the read method. It builds a list of all entries matching pyramid*.egg-info and pyramid*.dist-info and pick the first one that exists.
I changed the lines 34-35 to
fixes the problem for me. I don't think this is the best solution.
Regards
Estartu
Changed in pkginfo: | |
status: | New → Confirmed |
assignee: | nobody → Tres Seaver (tseaver) |
Thanks very much for the report!
I'm curious why you think your fix is not ideal. It looks to me as though any installed '.egg-info' or '.dist-info' directory *should* be prefixed by '<package_name>-'.