Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 382755 - sys-apps/portage-2.2.0_alpha55 --depclean wants to remove $package (such as pysqlite) and emerge @world -uDN wants to remerge it
Summary: sys-apps/portage-2.2.0_alpha55 --depclean wants to remove $package (such as p...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 155723
  Show dependency tree
 
Reported: 2011-09-12 22:37 UTC by Niko Böckerman
Modified: 2019-02-27 10:53 UTC (History)
2 users (show)

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


Attachments
Contents of /var/db/pkg/dev-lang/python-2.7.1-r1 (db_python-2.7.1-r1.tar.gz2,84.65 KB, application/octet-stream)
2011-09-13 06:47 UTC, Niko Böckerman
Details
Contents of /var/db/pkg/dev-lang/python-2.7.1-r1 which python from main tree (db_gentoo_python-2.7.1-r1.tar.gz2,84.68 KB, application/octet-stream)
2011-09-13 07:36 UTC, Niko Böckerman
Details
Output of emerge @world -uDN --pretend --debug &> debug.log (debug.log.tar.bz2,274.48 KB, application/x-bzip-compressed-tar)
2011-09-13 15:18 UTC, Niko Böckerman
Details
Contents of /var/db/pkg/dev-lang/python-3.1.3-r1 (db_gentoo_python-3.1.3-r1.tar.bz2,80.82 KB, application/x-bzip-compressed-tar)
2011-09-13 15:33 UTC, Niko Böckerman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Niko Böckerman 2011-09-12 22:37:16 UTC
Running emerge --depclean wants to remove pysqlite and after removing it running emerge @world -uDN wants to emerge it back. And after re-emerging it emerge --depclean wants to remove it again.

Only package that is depending on pysqlite is sqlalchemy:
# equery d pysqlite
 * These packages depend on pysqlite:
dev-python/sqlalchemy-0.6.7 (sqlite ? dev-python/pysqlite)
                            (test ? dev-python/pysqlite)

And the dependency line from sqlalchemy is
|| ( >=dev-lang/python-2.5[sqlite] dev-python/pysqlite )

I have python-2.7.1-r1 installed with sqlite use flag.

Reproducible: Always

Steps to Reproduce:
1. emerge =sqlalchemy-0.6.7
2. emerge --depclean
3. emerge @world -uDN
Actual Results:  
pysqlite is removed and then emerged back.

Expected Results:  
pysqlite is either removed by --depclean and not merged back by emerge @world -uDN or --depclean does not remove pysqlite

# emerge --info
Portage 2.2.0_alpha55 (default/linux/amd64/10.0/desktop/kde, gcc-4.4.5, glibc-2.12.2-r0, 2.6.39-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-gentoo-2.0.3
Timestamp of tree: Mon, 12 Sep 2011 18:15:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1::sage-on-gentoo, 3.1.3-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo crossdev_overlay finnish sunrise dustin sage-on-gentoo Overlay_manage_priorities arduino nikos_gentoo_overlay
Installed sets: @avr_programming, @chroot32, @display_driver, @electric_tools, @googleearth, @internet, @multimedia, @my_kde, @office, @science, @sularikurssi, @system_tools
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--columns"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/"
LANG="fi_FI.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS=""
MAKEOPTS="-j6"
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/local/portage/overlay_crossdev /var/lib/layman/finnish /var/lib/layman/sunrise /var/lib/layman/dustin /var/lib/layman/sage-on-gentoo /usr/local/portage/overlay_manage /usr/local/portage/overlay_arduino /usr/local/portage"
SYNC="rsync://rsync.se.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gdu gif gpm iconv ipv6 jpeg kde kipi lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses networkmanager nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl phonon plasma png policykit ppds pppd pulseaudio python qt3support qt4 readline sdl session spell sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype udev unicode usb vorbis x264 xcb xcomposite xinerama xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Zac Medico gentoo-dev 2011-09-13 05:54:14 UTC
Can you make a tarball of /var/db/pkg/dev-lang/python-2.7.1-r1 in case we need if for later analysis, and rebuild python-2.7.1-r1 to see if that helps?
Comment 2 Niko Böckerman 2011-09-13 06:47:02 UTC
Created attachment 286295 [details]
Contents of /var/db/pkg/dev-lang/python-2.7.1-r1
Comment 3 Niko Böckerman 2011-09-13 07:36:09 UTC
Created attachment 286299 [details]
Contents of /var/db/pkg/dev-lang/python-2.7.1-r1 which python from main tree

I just noticed while rebuilding python that I had python installed from sage-on-gentoo overlay. Rebuilding that did not help with the situation.

Then I changed sage dependencies so that I managed to build the python from main tree. That python version didn't help either.
Comment 4 Zac Medico gentoo-dev 2011-09-13 14:49:34 UTC
Please attach --pretend --debug output for the update command that pulls in pysqlite:

  emerge @world -uDN --pretend --debug &> debug.log
Comment 5 Niko Böckerman 2011-09-13 15:18:59 UTC
Created attachment 286353 [details]
Output of emerge @world -uDN --pretend --debug &> debug.log

Right after that debug command I ran this command to show that the pysqlite wants to get merged:

# emerge @world -uDNp

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-python/pysqlite     [2.6.3]  USE="-examples"
Comment 6 Zac Medico gentoo-dev 2011-09-13 15:25:20 UTC
Your debug log shows that it's trying to choose python-3.1.3-r1, and then rejects it:

Parent:    (dev-python/sqlalchemy-0.6.7::gentoo, installed)
Depstring: || ( >=dev-lang/python-2.5[sqlite] dev-python/pysqlite )
Priority:  runtime
installed: dev-lang/python-3.1.3-r1::gentoo
   ebuild: dev-python/pysqlite-2.6.3::gentoo
   ebuild: dev-python/pysqlite-2.6.3::gentoo
Candidates: ['dev-python/pysqlite']

I suspect that this is related to the patch that triggered bug 382557:

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

You can try reverting that patch to see if it helps.

Can you please attach a tarball of the /var/db/pkg/dev-lang/python-3.1.3-r1 directory?
Comment 7 Zac Medico gentoo-dev 2011-09-13 15:27:30 UTC
(In reply to comment #6)
> I suspect that this is related to the patch that triggered bug 382557:
> 
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=21330075f07248765016e104b3ba8216903f1ecb
> 
> You can try reverting that patch to see if it helps.

Actually, disregard the above patch, because python is not a virtual. Please do give us a /var/db/pkg/dev-lang/python-3.1.3-r1 tarball though.
Comment 8 Niko Böckerman 2011-09-13 15:33:22 UTC
Created attachment 286355 [details]
Contents of /var/db/pkg/dev-lang/python-3.1.3-r1
Comment 9 Zac Medico gentoo-dev 2011-09-13 16:02:54 UTC
It's probably triggered by the fact that you don't have USE=sqlite enabled for python-3.1.3-r1.
Comment 10 Niko Böckerman 2011-09-13 16:17:01 UTC
Oh yes, that might obviously be the case.
But shouldn't it still be satisfied as I have python:2.7 installed with USE=sqlite? As far as I can see that should fulfil the first dependency >=dev-lang/python-2.5[sqlite].
Comment 11 Zac Medico gentoo-dev 2011-09-13 16:35:10 UTC
Yes, we need to fix it to search all slots. We can use an approach similar to the one that we use for virtual slots to solve bug #141118 and bug #382557.
Comment 12 Erik Quaeghebeur 2012-02-17 13:58:44 UTC
(In reply to comment #9)
> It's probably triggered by the fact that you don't have USE=sqlite enabled for
> python-3.1.3-r1.

I get hit with this issue as well:

portage 2.1.10.44

python 2.7.2-r3 from the sage-on-gentoo overlay, with sqlite useflag
python 3.1.4-r3 from portage, without the sqlite useflag

Let me know if you want more specific info.
Comment 13 Zac Medico gentoo-dev 2012-02-17 20:13:05 UTC
The problem is that portage's dep_zapdeps function only matches the highest available slot for each choice of an || dependency like the one shown in comment #6:

  || ( >=dev-lang/python-2.5[sqlite] dev-python/pysqlite )

If python-3.x is installed with USE=-sqlite, that this causes dep_zapdeps to choose pysqlite instead of python-2*[sqlite]. Its not really easy to fix, given the way that the code currently works. However, if you experience this problem then a simple workaround is to enable USE=sqlite for python-3.x.
Comment 14 Dion Moult (RETIRED) gentoo-dev 2013-03-25 00:40:22 UTC
dev-python/pysqlite has been removed, see bug #408835. Marking as fixed.
Comment 15 Zac Medico gentoo-dev 2013-03-25 00:56:30 UTC
Re-opening, since this issue could affect similarly expressed dependencies.