Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337320 - python.eclass doesn't respect --nodeps emerge option
Summary: python.eclass doesn't respect --nodeps emerge option
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-14 18:03 UTC by Pacho Ramos
Modified: 2016-10-23 14:15 UTC (History)
3 users (show)

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


Attachments
Kill USE_WITH_* check in pkg_setup (kill-python-use-with.patch,2.31 KB, patch)
2011-08-19 09:42 UTC, Fabio Erculiani (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2010-09-14 18:03:41 UTC
I am having problems for building new emul-linux-x86 packages set because script I use for that runs the following command for installing buildpkgs on subdirectories used for preparing emul tarballs:
# ROOT=/root/ROOT/emul-linux-x86-xlibs/ emerge -q1KON libxcb
This fails because of the following:

>>> Emerging binary (1 of 1) x11-libs/libxcb-1.6 for /root/ROOT/emul-linux-x86-xlibs/
openpty failed: 'out of pty devices'
>>> Failed to emerge x11-libs/libxcb-1.6 for /root/ROOT/emul-linux-x86-xlibs/, Log file:
>>>  '/var/tmp/portage/x11-libs/libxcb-1.6/temp/build.log'
>>> Extracting info
 * CPV:  x11-libs/libxcb-1.6
 * REPO: gentoo
 * USE:  elibc_glibc kernel_linux userland_GNU x86
 * ERROR: x11-libs/libxcb-1.6 failed:
 *   dev-lang/python:2.6 is not installed
 * 
 * Call stack:
 *     ebuild.sh, line   54:  Called pkg_setup
 *   environment, line 3683:  Called python_set_active_version '2'
 *   environment, line 5269:  Called _python_final_sanity_checks
 *   environment, line  837:  Called die
 * The specific snippet of code:
 *                   die "$(python_get_implementational_package) is not installed";
 * 
 * If you need support, post the output of 'emerge --info =x11-libs/libxcb-1.6',
 * the complete build log and the output of 'emerge -pqv =x11-libs/libxcb-1.6'.
 * The complete build log is located at '/var/tmp/portage/x11-libs/libxcb-1.6/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/libxcb-1.6/temp/environment'.
 * S: '/var/tmp/portage/x11-libs/libxcb-1.6/work/libxcb-1.6'

 * Messages for package x11-libs/libxcb-1.6 merged to /root/ROOT/emul-linux-x86-xlibs/:

 * ERROR: x11-libs/libxcb-1.6 failed:
 *   dev-lang/python:2.6 is not installed
 * 
 * Call stack:
 *     ebuild.sh, line   54:  Called pkg_setup
 *   environment, line 3683:  Called python_set_active_version '2'
 *   environment, line 5269:  Called _python_final_sanity_checks
 *   environment, line  837:  Called die
 * The specific snippet of code:
 *                   die "$(python_get_implementational_package) is not installed";
 * 
 * If you need support, post the output of 'emerge --info =x11-libs/libxcb-1.6',
 * the complete build log and the output of 'emerge -pqv =x11-libs/libxcb-1.6'.
 * The complete build log is located at '/var/tmp/portage/x11-libs/libxcb-1.6/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/libxcb-1.6/temp/environment'.
 * S: '/var/tmp/portage/x11-libs/libxcb-1.6/work/libxcb-1.6'

But this is caused because python.eclass doesn't seem to have a way to respect --nodeps option and, then, don't try to pull python-2.6 dependency.

The problem is that I am not sure how could this be changed :-( (for now, I will try to modify libxcb ebuild to allow this installation temporally)

Thanks

Reproducible: Always
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-09-14 19:33:00 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"
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-09-14 19:34:31 UTC
(In reply to comment #1)
> ROOT=/root/ROOT/emul-linux-x86-xlibs

It should be:
ROOT=/root/ROOT/emul-linux-x86-xlibs/
Comment 3 Zac Medico gentoo-dev 2010-09-14 22:16:09 UTC
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.
Comment 4 Pacho Ramos gentoo-dev 2010-09-14 22:39:23 UTC
(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 :-)
Comment 5 Pacho Ramos gentoo-dev 2010-09-14 23:10:52 UTC
(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
Comment 6 Fabio Erculiani (RETIRED) gentoo-dev 2011-08-19 09:18:35 UTC
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.
Comment 7 Fabio Erculiani (RETIRED) gentoo-dev 2011-08-19 09:42:59 UTC
Created attachment 283877 [details, diff]
Kill USE_WITH_* check in pkg_setup
Comment 8 Fabio Erculiani (RETIRED) gentoo-dev 2011-08-19 10:25:55 UTC
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.
Comment 9 Torsten Veller (RETIRED) gentoo-dev 2011-08-19 10:29:37 UTC
-# $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
Comment 10 Fabio Erculiani (RETIRED) gentoo-dev 2011-08-25 08:25:16 UTC
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).
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-03-02 14:14:03 UTC
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.
Comment 12 Zac Medico gentoo-dev 2013-03-02 15:55:36 UTC
Note that in EAPI 5 there's a --host-root option for has_version and best_version helpers.
Comment 13 Patrice Clement gentoo-dev 2016-10-23 14:15:56 UTC
This eclass has been deprecated. See bug 459982.