Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 304187 - sys-apps/portage repoman should depend on dev-lang/python:2.6[xml] or maybe dev-lang/python:2.5[xml]
Summary: sys-apps/portage repoman should depend on dev-lang/python:2.6[xml] or maybe d...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 304189 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-09 22:18 UTC by Marcin Mirosław
Modified: 2012-12-23 07:51 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Mirosław 2010-02-09 22:18:27 UTC
I couldn't reopen bug 233973 so i'm opening new. Repoman doesn't work again when python:2.6 is compilled with "-xml" or pyxml isn't installed on system.

# repoman
Traceback (most recent call last):
  File "/usr/bin/repoman", line 60, in <module>
    from repoman import utilities
  File "/usr/lib/portage/pym/repoman/utilities.py", line 32, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.6/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat


Reproducible: Always

Steps to Reproduce:
1.USE="-xml" emerge -1 python:2.6
2.emerge -C pyxml
3.emerge gentoolkit && repoman




# emerge --info
Portage 2.1.7.17 (default/linux/x86/10.0/server, gcc-4.4.3, glibc-2.11-r1, 2.6.32-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.32-gentoo-r3-i686-Intel-R-_Core-TM-2_CPU_4300_@_1.80GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 09 Feb 2010 19:30:02 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p37
dev-lang/python:     2.6.4-r1, 3.1.1-r1
dev-util/ccache:     2.4-r8
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20
sys-devel/gcc:       4.3.4, 4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -mfpmath=sse -fpeel-loops -pipe -ftracer -floop-block -ftree-loop-distribution -floop-interchange -floop-strip-mine -floop-strip-mine"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -mfpmath=sse -fpeel-loops -pipe -ftracer -floop-block -ftree-loop-distribution -floop-interchange -floop-strip-mine -floop-strip-mine"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache collision-protect distlocks fixpackages metadata-transfer news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pl_PL"
LC_ALL="pl_PL.ISO-8859-2"
LDFLAGS="-Wl,-O1"
LINGUAS="en pl"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/local/portage/miro-overlay/staging /usr/local/portage/miro-overlay/portage /usr/local/SUNRISE/maintainer-wanted"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="a52 aac acl acpi adns aio apache2 ares aspell async audiofile automount bash-completion bcmath berkdb bittorrent bzip2 caps cgi chroot clamav clamdtop cli cracklib crypt curl cxx daemon dhcp domainkeys dri dts dvd embedded exif exiscan exiscan-acl extras faac faad fam flac fortran ftp gdbm gmp gnutls gpm graphite hash iconv idn ieee1394 iproute2 ipv6 javascript jpeg justify logrotate logwatch loop-aes lzo maildir mmap mmx mmxext modules mouse mp3 mp4 mpeg mudflap nagios-dns nagios-ntp nagios-ping nagios-ssh ncurses netpbm network-cron nls nntp nptl nptlonly ogg openmp openssl optimization optimized-qmake pam pcre perl png pop3d posix pppd prelude profile python quotas rar readline reflection samba session sharedmem shorten slang smp sockets spell spf spl sse sse2 sse3 ssl ssse3 stats subtitles svg swat sysfs syslog theora threads tiff tokenizer tools tordns tos transcode unicode unzip urandom usb uudeview vcd vdpau vhosts vim vim-pager vim-syntax visibility vorbis wifi x86 xattr xfs xmlreader xmlrpc xmlwriter xorg xsl xvid xvmc zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en pl" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rafał Mużyło 2010-02-09 22:53:33 UTC
Looks like you're using portage the wrong way.
If you switched useflags by USE, not package.use,
settings were not preserved and without '-N'
portage doesn't check useflag changes.

Well, anyway, all the versions in portage have python[xml] dep.
Comment 2 Marcin Mirosław 2010-02-09 23:19:09 UTC
(In reply to comment #1)
> Looks like you're using portage the wrong way.
> If you switched useflags by USE, not package.use,
> settings were not preserved and without '-N'
> portage doesn't check useflag changes.

It was way to reproduce error. I've got USE "-xml" in make.conf
 
> Well, anyway, all the versions in portage have python[xml] dep.

I can see two problems: wrong dependency in gentoolkit [1] (it still use python:2.6 not 3.1) so DEPEND should look like this: dev-lang/python:2.6[xml]. And second, should portage check all slotted version of python for support of xml?
[1] - i've got python 2.6 compiled without xml and python:3.1 with xml support.
Comment 3 Rafał Mużyło 2010-02-10 01:25:48 UTC
What's your active python version ?
...2.6, right ?
Comment 4 Marcin Mirosław 2010-02-10 07:36:22 UTC
*** Bug 304189 has been marked as a duplicate of this bug. ***
Comment 5 Marcin Mirosław 2010-02-10 07:38:45 UTC
Yes, my active version is python-2.6 .
Comment 6 Rafał Mużyło 2010-02-12 16:02:59 UTC
eselect is a system, not portage module.
portage in deps calculation does not (and probably can't)
take various eselect settings, it only verifies,
that there's an installed version, that matches requirements.

There is one: python-3.1.1-r1[xml].
I think CANTFIX is the resolution here.
Comment 7 Marcin Mirosław 2010-02-12 16:33:36 UTC
Rafał, currently gentoolkit partially suports python3. Repoman can work with python3 , equery probably has workarround to always run with python2 (even when eselect python is set to python3) . Glsa-check, revdep, epkginfo.. the same, they force to use python2. :
# eselect python list
Available Python interpreters:
  [1]   python2.6
  [2]   python3.1 *
# epkginfo -d gzip
Traceback (most recent call last):
  File "/usr/bin/epkginfo-2.6", line 34, in <module>
    main(args)
  File "/usr/lib/python2.6/site-packages/gentoolkit/equery/meta.py", line 480, in main
    matches = find_packages(query, include_masked=True)
  File "/usr/lib/python2.6/site-packages/gentoolkit/helpers.py", line 535, in find_packages
    from gentoolkit.package import Package
  File "/usr/lib/python2.6/site-packages/gentoolkit/package.py", line 46, in <module>
    from gentoolkit.metadata import MetaData
  File "/usr/lib/python2.6/site-packages/gentoolkit/metadata.py", line 48, in <module>
    import xml.etree.cElementTree as etree
  File "/usr/lib/python2.6/xml/etree/cElementTree.py", line 3, in <module>
    from _elementtree import *
ImportError: No module named _elementtree

And so on..
This is why i think that dependency dev-lang/python:2.6[xml] is correct resolution until gentoolkit will be able to works with python3.
Comment 8 Zac Medico gentoo-dev 2010-02-12 16:52:10 UTC
I guess we could add a USE setting to require xml support. It should be conditional since repoman is only needed for committing ebuilds, qa checks or generating manifests.

We can also add a runtime check for xml support, and give a friendly error message it it's not detected. Also, we can generate an ewarn message in pkg_preinst if the selected version of python has no xml support.
Comment 9 Brian Dolbec (RETIRED) gentoo-dev 2012-12-23 02:03:49 UTC
Zac,  is this bug a portage bug?  The title indicates a gentoolkit one, but the content seems to point to repoman.

Also is this still relevant?
Comment 10 Zac Medico gentoo-dev 2012-12-23 07:51:12 UTC
We've had this runtime check in repoman for some time now:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=14ffb5c29f748114dd529d0c20e3c5fe6d953b5f