Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 502236

Summary: sys-apps/portage: Unsolvable blockers prevent slot operator rebuilds
Product: Portage Development Reporter: Alan Mackenzie <acm>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: dabbott, gentoo
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge -p --backtrack=100 --debug &> emerge-debug.log; bzip2 -9 ....

Description Alan Mackenzie 2014-02-23 11:53:50 UTC
I try to execute emerge (for the first time in ~70 days).  It produces difficult to understand (for me) error messages.  After asking for help on gentoo-user, it seems the problem is that
(i) a library, libpng, is to be updated;
(ii) Several packages depend on the existing version of libpng;
(iii) There is a "conflict" between the new and existing versions of libpng.
I think this is the problem that in the past revdep-rebuild solved.

It is not clear how to clear this wedgeing.  The remedy emerge suggests (... by using package.mask ...) doesn't seem helpful.

I stumbled over this whilst trying "emerge -puND world".  The following output is from a simplified version of this:

################################################################################
root@acm ~ # emerge -p libpng

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

Calculating dependencies... done!
[ebuild     U  ] media-libs/libpng-1.6.8 [1.5.17-r1] ABI_X86="(64%*) (-32) (-x32)"

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

media-libs/libpng:0

  (media-libs/libpng-1.5.17-r1::gentoo, installed) pulled in by
    media-libs/libpng:0/0= required by (x11-libs/cairo-1.12.14-r4::gentoo, installed)
    >=media-libs/libpng-1.4:0/0= required by (app-editors/emacs-24.3-r2::gentoo, installed)
    media-libs/libpng:0/0= required by (media-libs/libwebp-0.3.1::gentoo, installed)
    media-libs/libpng:0/0= required by (net-print/cups-filters-1.0.36-r1::gentoo, installed)
    media-libs/libpng:0/0= required by (kde-base/kdelibs-4.11.2-r1::gentoo, installed)
    media-libs/libpng:0/0= required by (dev-qt/qtgui-4.8.5-r1::gentoo, installed)
    media-libs/libpng:0/0= required by (app-text/poppler-0.24.3::gentoo, installed)
    (and 3 more with the same problems)

  (media-libs/libpng-1.6.8::gentoo, ebuild scheduled for merge) pulled in by
    (no parents that aren't satisfied by other packages in this slot)


It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously.  If such a conflict exists in
the dependencies of two different packages, then those packages can
not be installed simultaneously.

For more information, see MASKED PACKAGES section in the emerge man
page or refer to the Gentoo Handbook.
################################################################################

As well as the primary bug (if such it be), the error messages seem less than helpful.  In particular, the string "media-libs/libpng:0/0=" is not documented in the OUTPUT section of the emerge man page.  I've since discovered it's in the ebuild(5) man page under "Atom Slot Operators".
Also, I doubt package.mask is any help at all, here, and the MASKED PACKAGES man page section has nothing much to offer.

At the moment, I don't know how to unwedge my system.  Nobody on gentoo-user has yet come up with the definitive solution.

Reproducible: Always

Steps to Reproduce:
emerge -p libpng
Actual Results:  
emerge trips up on "conflict".

Expected Results:  
emerge should have merged libpng-1.6.8.

emerge --info:
Portage 2.2.7 (default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.16.0, 3.8.13-gentoo x86_64)
=================================================================
System uname: Linux-3.8.13-gentoo-x86_64-AMD_Athlon-tm-_II_X4_620_Processor-with-gentoo-2.2
KiB Mem:     4045012 total,   1835848 free
KiB Swap:   20980880 total,  20980880 free
Timestamp of tree: Sat, 22 Feb 2014 19:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.3.2-r2
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/qmail/alias /var/qmail/control"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs 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="ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
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=""
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdr cli consolekit cracklib crypt cups cxx dbus device-mapper dri dts dvd dvdr emacs emboss encode exif fam ffmpeg firefox flac fortran gdbm gif gpm gtk iconv icu ipv6 jpeg lame lcms ldap libnotify lock mad mmx mng modules mp3 mp4 mpeg mule multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf perl png policykit ppds python qt3support readline sdl session spell sqlite sse sse1 sse2 ssl startup-notification svg tcpd thunar tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xml xv xvid 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="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="radeonhd 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Sebastian Luther (few) 2014-02-23 17:27:50 UTC
Please try again with portage-2.2.8-r1. If this doesn't help try portage-9999.
Comment 2 Alan Mackenzie 2014-02-24 19:45:56 UTC
(In reply to Sebastian Luther (few) from comment #1)
> Please try again with portage-2.2.8-r1. If this doesn't help try
> portage-9999.

Unfortunately, neither version helps at all.  Both give the same error message as portage-2.2.7 (though -9999 abbreviates it more).
Comment 3 Sebastian Luther (few) 2014-02-24 20:03:08 UTC
Please try with a higher --backtrack value. Something like --backtrack=30.
Comment 4 Alan Mackenzie 2014-02-24 20:15:10 UTC
(In reply to Sebastian Luther (few) from comment #3)
> Please try with a higher --backtrack value. Something like --backtrack=30.

I've just tried # emerge -p --backtrack=100 libpng
.  (This is portage-9999.)  I still get the same error message.
Comment 5 Sebastian Luther (few) 2014-02-24 20:54:04 UTC
Ok, then add --debug and attach the output using portage-9999.

emerge -p --backtrack=100 libpng --debug &> debug.log
Comment 6 Alan Mackenzie 2014-02-24 21:30:52 UTC
Created attachment 371192 [details]
emerge -p --backtrack=100 --debug &> emerge-debug.log; bzip2 -9 ....

bzip2 compressed by a factor of ~20, thus fitting inside the 1 Mb limit.
Comment 7 Sebastian Luther (few) 2014-02-24 21:55:31 UTC
To update libpng emerge has to rebuild/update several other packages. These packages are causing other problems. 

It looks like it's giving up because of these blockers:
[blocks B      ] net-print/foomatic-filters ("net-print/foomatic-filters" is blocking net-print/cups-filters-1.0.43-r1)
[blocks B      ] >=net-print/cups-filters-1.0.43-r1[foomatic] (">=net-print/cups-filters-1.0.43-r1[foomatic]" is blocking net-print/foomatic-filters-4.0.17-r1)
[blocks B      ] <dev-libs/gobject-introspection-1.38 ("<dev-libs/gobject-introspection-1.38" is blocking dev-libs/glib-2.38.2)

I'd try to update these first.

The final message is just: "I can't figure it out, do it yourself".
Comment 8 Alan Mackenzie 2014-02-24 22:22:50 UTC
(In reply to Sebastian Luther (few) from comment #7)
> To update libpng emerge has to rebuild/update several other packages. These
> packages are causing other problems. 
> 
> It looks like it's giving up because of these blockers:
> [blocks B      ] net-print/foomatic-filters ("net-print/foomatic-filters" is
> blocking net-print/cups-filters-1.0.43-r1)
> [blocks B      ] >=net-print/cups-filters-1.0.43-r1[foomatic]
> (">=net-print/cups-filters-1.0.43-r1[foomatic]" is blocking
> net-print/foomatic-filters-4.0.17-r1)
> [blocks B      ] <dev-libs/gobject-introspection-1.38
> ("<dev-libs/gobject-introspection-1.38" is blocking dev-libs/glib-2.38.2)
> 
> I'd try to update these first.
> 
> The final message is just: "I can't figure it out, do it yourself".

OK.  But these blocker lines were _NOT_ output from the emerge command.  They used to be, IIRC.  Where did you get that blocker information from?  Was it in the debug output?  (takes a quick look at the log...) Er, yes, it was.

Would it be possible to amend emerge so that it does output this information again?  Without this info, it's difficult (or impossible) to resolve a wedged state.

Can I take it, that with this debug log output, there is no further interest in the state of my portage?  If so, I'll go ahead and start fixing it.

Thanks for all the help!

-- 
Alan.
Comment 9 Sebastian Luther (few) 2014-02-25 17:08:53 UTC
(In reply to Alan Mackenzie from comment #8)
> Can I take it, that with this debug log output, there is no further interest
> in the state of my portage?  If so, I'll go ahead and start fixing it.
> 
If fixing those blockers allows emerge to find a proper solution then there's no need for more information. Otherwise we'd need a new debug log.