Summary: | Disallow installation of "test" and "tests" in Python site-packages directories | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Diego Elio Pettenò (RETIRED) <flameeyes> |
Component: | Eclasses | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | lssndrbarbieri, mgorny, python, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=836458 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Build log (dev-python/oauth2) |
Description
Diego Elio Pettenò (RETIRED)
2011-05-06 07:38:07 UTC
I filed https://github.com/simplegeo/python-oauth2/issues/69 and https://bugs.freedesktop.org/show_bug.cgi?id=36895. dev-python/oauth2-1.5.170 (added to the tree about 15 hours before this bug was filed) deletes tests in src_install()... In case of upstream bug reports, I suggest to not install tests. Apparently papyon-0.5.5 should also fix this. dev-python/papyon-0.5.5 was added to the tree (bug #366267) and fixes this bug. I suggest that Portage disallow installation of: /usr/lib(32|64)?/python[[:digit:]]+\.[[:digit:]]+/site-packages/test /usr/lib(32|64)?/python[[:digit:]]+\.[[:digit:]]+/site-packages/tests (In reply to comment #5) I will implement this suggestion in bin/misc-functions.sh in next week if there are no objections. (In reply to comment #6) > I will implement this suggestion in bin/misc-functions.sh in next week if there > are no objections. I would suggest something similar to the "QA Notice: This ebuild installs into the following deprecated directories:" eqaqarn message. It should be the job of the ebuild to remove these files. If the package manager actually removes the files, then it's entering the domain of PMS since all package managers will be expected to do it. (In reply to comment #7) I suggest to call die() without trying to remove these files. This is handled by distutils-r1.eclass since 2013: commit 65d2ba5649fb2a2e7d1e9d5c33a5a7f835bada24 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2013-02-10 12:38:17 +0100 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2013-02-10 12:38:17 +0100 Error out if "tests" package is installed. This is a common mistake and a source of file collisions. (later extended to "test", "examples"...) Technically, this doesn't cover ebuilds that do not use distutils-r1.eclass but I think that's a corner case that isn't worth the effort. If we really consider this a problem, we can move the check from eclass to install-qa-check.d. |