Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 528610 - net-nds/openldap-2.4.40-r2: infinite reinstall loop (via 'emerge -avuD @world') when USE=berkdb is enabled
Summary: net-nds/openldap-2.4.40-r2: infinite reinstall loop (via 'emerge -avuD @world...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, PATCH
: 529094 (view as bug list)
Depends on:
Blocks: 155723 484436
  Show dependency tree
 
Reported: 2014-11-08 07:28 UTC by PL Hayes
Modified: 2016-03-03 20:43 UTC (History)
9 users (show)

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


Attachments
'emerge --info' output (file_528610.txt,5.41 KB, text/plain)
2014-11-08 07:29 UTC, PL Hayes
Details
RDEPEND (RDEPEND,310 bytes, text/plain)
2014-11-14 19:07 UTC, Justin Lecher (RETIRED)
Details
Rdepend-dwt (RDEPEND,291 bytes, text/plain)
2014-11-15 00:23 UTC, Derk W te Bokkel
Details
debug.log-dwt compressed (debug.log.tar.gz,541.34 KB, application/gzip)
2014-11-15 13:12 UTC, Derk W te Bokkel
Details
_slot_operator_update_probe: fix bug #528610 (_slot_operator_update_probe-fix-bug-528610.patch,3.78 KB, patch)
2014-11-16 07:14 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description PL Hayes 2014-11-08 07:28:33 UTC
Every time 'emerge -avuD @world' is run a reinstall of openldap-2.4.40-r2 is triggered.

Reproducible: Always

Steps to Reproduce:
1. emerge -avuD @world
2. emerge -avuD @world
3.
Actual Results:  
[In both steps]

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

Calculating dependencies... done!
[ebuild  rR    ] net-nds/openldap-2.4.40-r2  USE="berkdb crypt icu ipv6 ssl syslog -cxx -debug -experimental -gnutls -iodbc -kerberos -minimal -odbc -overlays -perl -samba -sasl (-selinux) -slp -smbkrb5passwd -static-libs -tcpd" ABI_X86="(64) -32 (-x32)" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] 

... openldap reinstalls ...

[Success!]

Expected Results:  
One reinstall should be enough!

I've run 'emerge --depclean' and tried running 'emerge -avu @world' (without the 'D') but always with the same results.
Comment 1 PL Hayes 2014-11-08 07:29:38 UTC
Created attachment 388822 [details]
'emerge --info' output
Comment 2 Michael Buchfink 2014-11-08 07:44:27 UTC
same problem here
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-08 15:13:33 UTC
Add --verbose --tree to the emerge call to see what is happening.
Comment 4 PL Hayes 2014-11-08 16:31:52 UTC
(In reply to Jeroen Roovers from comment #3)
> Add --verbose --tree to the emerge call to see what is happening.

Good idea but...

~ # emerge -avuD --verbose --tree @world

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

Calculating dependencies... done!
[ebuild  rR    ] net-nds/openldap-2.4.40-r2  USE="berkdb crypt icu ipv6 ssl syslog -cxx -debug -experimental -gnutls -iodbc -kerberos -minimal -odbc -overlays -perl -samba -sasl (-selinux) -slp -smbkrb5passwd -static-libs -tcpd" ABI_X86="(64) -32 (-x32)" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] n

Quitting.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-08 20:30:36 UTC
No idea why it does that, as emerge isn't saying. Could it be linking against the old installed libraries?

Please post your `emerge --info' output in a comment.
Comment 6 PL Hayes 2014-11-08 22:43:38 UTC
(In reply to Jeroen Roovers from comment #5)
> No idea why it does that, as emerge isn't saying. Could it be linking
> against the old installed libraries?
> 
> Please post your `emerge --info' output in a comment.

`emerge --info' already posted as an attachment!

Anyway, I think you're right: if I run 'USE="-berkdb" emerge -avuD @world' no reinstall of openldap is triggered. I have a sys-libs/db:6.0 installed and openldap has linked against a sys-libs/db:5.3 which is also installed. That seems fine but perhaps there is something wrong with the relevant part of the openldap-2.40.4-r2 ebuild...

                 berkdb? (
                        <sys-libs/db-6.0:=
                        || ( ${BDB_PKGS} )
                        )

...?
Comment 7 PL Hayes 2014-11-10 06:04:57 UTC
The strange behaviour's mysteriously ceased now that 2.4.40-r3 is installed.
Comment 8 Joe Kappus 2014-11-11 20:31:16 UTC
I'm still having this issue with 2.4.40-r3.  I'll post a followup comment when I have more info.  

Portage 2.2.14 (python 3.3.5-final-0, default/linux/amd64/13.0/no-multilib, gcc-4.9.2, glibc-2.20, 3.17.1-bfs456 x86_64)
=================================================================
System uname: Linux-3.17.1-bfs456-x86_64-Intel-R-_Core-TM-_i7-4558U_CPU_@_2.80GHz-with-gentoo-2.2
KiB Mem:    16318568 total,   6543704 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Tue, 11 Nov 2014 19:00:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.3_p30-r1
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.1-r2
dev-lang/python:          2.7.8, 3.3.5-r1, 3.4.2
dev-util/cmake:           3.0.2
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.9.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.3-r2
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.17-r1 (virtual/os-headers)
sys-libs/glibc:           2.20
Repositories: gentoo bitcoin pentoo betagarden luke-jr x11 hasufell tox-overlay qt sunrise AzP mozilla local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -floop-interchange -floop-strip-mine -floop-block"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native -floop-interchange -floop-strip-mine -floop-block"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.llarian.net/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/bitcoin /var/lib/layman/pentoo /var/lib/layman/betagarden /var/lib/layman/luke-jr /var/lib/layman/x11 /var/lib/layman/hasufell /var/lib/layman/tox-overlay /var/lib/layman/qt /var/lib/layman/sunrise /var/lib/layman/AzP /var/lib/layman/mozilla /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa amd64 avx avx2 berkdb bzip2 c++0x cli corefonts cracklib crypt cups cxx dri egl flac fontconfig gdbm gif gpm iconv icu ipv6 jpeg mmx mmxext modules ncurses nls nptl nptlonly ogg opengl openmp pam pch pcre png ppds readline sdl session sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 tcpd threads tiff truetype unicode usb vdpau wifi xcb xinerama zlib" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 
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 sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="nmea" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="synaptics evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" SANE_BACKENDS="hp hp3500 hp3900 hp4200 hp5400 hp5590 hpljm1005 hpsj5s" USERLAND="GNU" VIDEO_CARDS="fbdev intel vesa i965" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-13 00:28:52 UTC
*** Bug 529094 has been marked as a duplicate of this bug. ***
Comment 10 Justin Lecher (RETIRED) gentoo-dev 2014-11-14 08:08:43 UTC
We need to figure out what is going wrong here.
Comment 11 Justin Lecher (RETIRED) gentoo-dev 2014-11-14 09:14:06 UTC
with --debug I see this

Child:         (net-nds/openldap-2.4.40-r3:0/0::gentoo, ebuild scheduled for merge) USE="berkdb crypt icu ipv6 samba ssl syslog tcpd -cxx -debug -experimental -gnutls -iodbc -kerberos -minimal -odbc -overlays -perl -sasl (-selinux) -slp -smbkrb5passwd -static-libs" ABI_X86="64 -32 -x32"
Parent Dep:    net-nds/openldap:0 required by @__auto_slot_operator_replace_installed__


Could that help?
Comment 12 Justin Lecher (RETIRED) gentoo-dev 2014-11-14 11:33:09 UTC
USE=-berkdb emerge -1 openldap && emerge openldap, fixes the problem. Perhaps it is still interesting why portage cannot solve it itself.
Comment 13 Justin Lecher (RETIRED) gentoo-dev 2014-11-14 11:35:30 UTC
Interestingly a depclean after that results in

sys-libs/db
    selected: 5.3.28-r2 
   protected: none 
     omitted: 4.8.30-r2 6.0.30-r1 

All selected packages: =sys-libs/db-5.3.28-r2

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

Would you like to unmerge these packages? [Yes/No] 


So the highest supported SLOT of sys-libs/db for openldap gets removed in favour of an older version.
Comment 14 Justin Lecher (RETIRED) gentoo-dev 2014-11-14 11:40:39 UTC
Even worse,

openldap depends on the older SLOT but is linked to a newer

!!! existing preserved libs:
>>> package: sys-libs/db-5.3.28-r2
 *  - /usr/lib64/libdb-5.3.so
 *      used by /usr/lib64/openldap/slapd (net-nds/openldap-2.4.40-r3)
Comment 15 Zac Medico gentoo-dev 2014-11-14 18:58:40 UTC
(In reply to Justin Lecher from comment #12)
> USE=-berkdb emerge -1 openldap && emerge openldap, fixes the problem.
> Perhaps it is still interesting why portage cannot solve it itself.

It probably has something to do with the slot-operator dep that's recorded in /var/db/pkg/net-nds/openldap-*/RDEPEND. If you are experiencing this problem, then please post the content of this file.
Comment 16 Justin Lecher (RETIRED) gentoo-dev 2014-11-14 19:07:49 UTC
Created attachment 389324 [details]
RDEPEND

RDEPEND
Comment 17 Justin Lecher (RETIRED) gentoo-dev 2014-11-14 19:11:44 UTC
Comment on attachment 389324 [details]
RDEPEND

This is redundant to the next db dep

<sys-libs/db-6.0:5.3/5.3= 



This is wrong, isn't it? Openldap gets linked to latest version installed but we don't exactly depend on that version. Any other version fulfils the dep as well although we linked to the latest. I would say, it is an ebuild error, not portage.


|| ( sys-libs/db:5.3 sys-libs/db:5.1 sys-libs/db:4.8 sys-libs/db:4.7 sys-libs/db:4.6 sys-libs/db:4.5 sys-libs/db:4.4 )
Comment 18 Arfrever Frehtes Taifersar Arahesis 2014-11-14 19:25:52 UTC
(In reply to Justin Lecher from comment #17)
> Comment on attachment 389324 [details]
> RDEPEND
> 
> This is redundant to the next db dep
> 
> <sys-libs/db-6.0:5.3/5.3= 
> 
> 
> 
> This is wrong, isn't it? Openldap gets linked to latest version installed
> but we don't exactly depend on that version. Any other version fulfils the
> dep as well although we linked to the latest. I would say, it is an ebuild
> error, not portage.
> 
> 
> || ( sys-libs/db:5.3 sys-libs/db:5.1 sys-libs/db:4.8 sys-libs/db:4.7
> sys-libs/db:4.6 sys-libs/db:4.5 sys-libs/db:4.4 )

Dependency is correct. Dependency assumes usage of latest version older than 6.0.
Comment 19 Arfrever Frehtes Taifersar Arahesis 2014-11-14 19:27:06 UTC
Can anybody reproduce problem with Portage 2.2.14?
Comment 20 Justin Lecher (RETIRED) gentoo-dev 2014-11-14 19:34:21 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #19)
> Can anybody reproduce problem with Portage 2.2.14?

Yes, I see this in two boxes with that version.
Comment 21 Derk W te Bokkel 2014-11-15 00:23:08 UTC
Created attachment 389346 [details]
Rdepend-dwt

equery list portage
 * Searching for portage ...
[IP-] [  ] sys-apps/portage-2.2.14:0

have issue still with portage-2.2.14
Comment 22 Zac Medico gentoo-dev 2014-11-15 09:08:13 UTC
Please attach a debug log showing the incorrect behavior, created as follows:

    emerge -pvuD @world --debug > debug.log 2>&1
Comment 23 Derk W te Bokkel 2014-11-15 13:12:44 UTC
Created attachment 389384 [details]
debug.log-dwt compressed

from: emerge -pvuD @world --debug > debug.log 2>&1

FYI
Comment 24 Zac Medico gentoo-dev 2014-11-15 17:23:52 UTC
The debug log shows that slot_operator_update_probe is choosing sys-libs/db-6.0.30-r1, even though it doesn't match the relevant <sys-libs/db-6.0:= atom:

slot_operator_update_probe:
   existing child package:  (sys-libs/db-5.3.28-r2:5.3/5.3::gentoo, installed)
   existing parent package: (net-nds/openldap-2.4.40-r3:0/0::gentoo, installed)
   new child package:  (sys-libs/db-6.0.30-r1:6.0/6.0::gentoo, ebuild scheduled for merge)
   new parent package: (net-nds/openldap-2.4.40:0/0::gentoo, ebuild scheduled for merge)


So, apparently slot_operator_update_probe needs to be fixed to obey all constraints of the relevant atom.
Comment 25 Zac Medico gentoo-dev 2014-11-16 04:25:28 UTC
(In reply to Zac Medico from comment #24)
> slot_operator_update_probe:
>    existing child package:  (sys-libs/db-5.3.28-r2:5.3/5.3::gentoo,
> installed)
>    existing parent package: (net-nds/openldap-2.4.40-r3:0/0::gentoo,
> installed)
>    new child package:  (sys-libs/db-6.0.30-r1:6.0/6.0::gentoo, ebuild
> scheduled for merge)
>    new parent package: (net-nds/openldap-2.4.40:0/0::gentoo, ebuild
> scheduled for merge)

The incorrect behavior seems related to the choice of net-nds/openldap-2.4.40 shown above, which simply depends on sys-libs/db, with no slot or version constraints. This explains why it chose sys-libs/db-6*, because it's the highest available match for sys-libs/db.
Comment 26 Zac Medico gentoo-dev 2014-11-16 04:35:07 UTC
I have a test case that reproduces this bug in the following branch:

	https://github.com/zmedico/portage/tree/bug_528610
Comment 27 Zac Medico gentoo-dev 2014-11-16 07:14:36 UTC
Created attachment 389470 [details, diff]
_slot_operator_update_probe: fix bug #528610

I've posted this patch for review here:

	http://thread.gmane.org/gmane.linux.gentoo.portage.devel/4793
Comment 28 Zac Medico gentoo-dev 2014-11-16 07:30:59 UTC
(In reply to Justin Lecher from comment #17)
> I would say, it is an ebuild error, not portage.

There's definitely a portage bug here. However, I wonder if that sys-libs/db dependency in openldap-2.4.40.ebuild is correct. Does it really work with sys-libs/db-6.x ?
Comment 29 Zac Medico gentoo-dev 2014-11-16 09:06:59 UTC
This is in the master branch now:

https://github.com/gentoo/portage/commit/390f90c2bee92ee5c845cdd765824b48ed6718ad
Comment 30 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-11-17 07:24:36 UTC
zmedico:
Yes, openldap-2.4.40 does actually work with db-6; however, the later revisions block db-6 due to a licensing compatibility problem.

You can use it just fine, but Oracle will come knocking on the door for your AGPL3 license violation, wanting damages in the form of buying a commercial license to db-6.

Because of this, upstream OpenLDAP intends to drop sys-libs/db support entirely in the future, in favour of LMDB.
Comment 31 Viktar Patotski 2014-11-25 21:30:00 UTC
I expect same problem:
net-nds/openldap-2.4.40-r3 keeps reinstalling with any emerge --update --newuse --deep @world