Summary: | python.eclass doesn't respect --nodeps emerge option | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Pacho Ramos <pacho> |
Component: | Current packages | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | dev-portage, lxnay, tove |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Kill USE_WITH_* check in pkg_setup |
Description
Pacho Ramos
2010-09-14 18:03:41 UTC
The problem is that has_version checks if a package is installed in ${ROOT}, but sometimes checking in / would be more desirable. See also http://lists.exherbo.org/pipermail/exherbo-dev/2010-August/000709.html . As a temporary workaround, you can use the following commands in your script: ROOT=/root/ROOT/emul-linux-x86-xlibs mkdir -p "${ROOT}var/db/pkg/dev-lang" cp /var/db/pkg/dev-lang/python-2.6* "${ROOT}var/db/pkg/dev-lang" (In reply to comment #1) > ROOT=/root/ROOT/emul-linux-x86-xlibs It should be: ROOT=/root/ROOT/emul-linux-x86-xlibs/ Maybe something like HDEPEND from bug 317337 would help make ROOT support work better. However, it certainly won't help with --nodeps case since that explicitly ignores dependencies. The --nodeps option isn't really recommended for general use, so it would be best if you could avoid using it. Do you know why the scribt is using that option? Maybe the --root-deps=rdeps option will help you, since that can be used as a workaround for lack of HDEPEND support. (In reply to comment #3) > Maybe something like HDEPEND from bug 317337 would help make ROOT support work > better. However, it certainly won't help with --nodeps case since that > explicitly ignores dependencies. The --nodeps option isn't really recommended > for general use, so it would be best if you could avoid using it. Do you know > why the scribt is using that option? Maybe the --root-deps=rdeps option will > help you, since that can be used as a workaround for lack of HDEPEND support. > --nodeps looks to be needed because using --root-deps=rdeps causes the following errors: emerge: there are no ebuilds to satisfy "net-dns/avahi". (dependency required by "sys-auth/nss-mdns-0.10" [binary]) (dependency required by "sys-auth/nss-mdns" [argument]) Looks like it wants to get "net-dns/avahi" installed under /root/ROOT/emul-linux-x86-xlibs/, that is not desired since /root/ROOT/emul-linux-x86-xlibs/ will be used for creating tarball corresponding to app-emulation/emul-linux-x86-baselibs, that doesn't need to provide avahi (as nss-mdns libs don't need it). Will try Arfrever's workaround to see if it works. Thanks a lot :-) (In reply to comment #2) > (In reply to comment #1) > > ROOT=/root/ROOT/emul-linux-x86-xlibs > > It should be: > ROOT=/root/ROOT/emul-linux-x86-xlibs/ > It worked, thanks a lot :-D Same thing with PYTHON_USE_WITH in pkg_setup of python.eclass. We DO HAVE use dependencies already, there is no need to check if dev-lang/python is built with such USE flags there and die! It makes (example following) emerge sci-chemistry/pymol --nodeps fail if dev-lang/python[-tk]. Please get rid of that, if possible. Created attachment 283877 [details, diff]
Kill USE_WITH_* check in pkg_setup
In the end I fixed it myself, it was just the if condition wrong inside python_pkg_setup. The check should be applied ONLY to EAPI=0 and EAPI=1, I guess Arfrever made a typo in there. -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.127 2011/07/08 07:49:36 djc Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.129 2011/08/19 10:18:59 lxnay Exp $ - if ! has "${EAPI:-0}" 0 1 && [[ -n "${PYTHON_USE_WITH}" || -n "${PYTHON_USE_WITH_OR}" ]]; then + if has "${EAPI:-0}" 0 1 && [[ -n "${PYTHON_USE_WITH}" || -n "${PYTHON_USE_WITH_OR}" ]]; then really? It will fail because later it uses an EAPI=2 feature: + if ! has_version "${python_atom}[${USE_flag}]"; then Yes, you're correct. the problem is that the whole PYTHON_USE_WITH looks half broken and doesn't solve the real issue (incomplete *DEPEND). Do we want/need to do something about it or can I close it as WONTFIX? X11 hasn't accepted my python-r1 patches so far. Note that in EAPI 5 there's a --host-root option for has_version and best_version helpers. This eclass has been deprecated. See bug 459982. |