Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 484322 - dev-haskell/network is rebuilt before dev-haskell/parsec after dev-lang/ghc update - ?
Summary: dev-haskell/network is rebuilt before dev-haskell/parsec after dev-lang/ghc u...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-09 10:48 UTC by Marc Joliet
Modified: 2014-01-11 15:09 UTC (History)
1 user (show)

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 Marc Joliet 2013-09-09 10:48:44 UTC
After a dev-lang/ghc update the automatically triggered rebuild of dev-haskell/* packages failed at dev-haskell/network because it DEPENDs (and RDEPENDS) on dev-haskell/parsec, which however was *not* rebuilt before network.

I ran haskell-updater afterwards, which got the order right (maybe coincidentally?), but I'm surprised that portage didn't.

Note that this happened last week with portage-2.1.x, before portage-2.2.1 went stable, so maybe it was fixed there (I didn't notice anything from skimming the portage-2.2.1 tracker).  I originally wrote to gentoo-user (in case somebody could think of a reason why this isn't a bug), and am only now reporting it here due to a lack of replies.

Reproducible: Didn't try

Steps to Reproduce:
1. Upgrade dev-lang/ghc
2.
3.
Actual Results:  
emerge fails (or might fail) at dev-haskell/network.

Expected Results:  
emerge updates ghc and rebuilds all dependent dev-haskell packages successfully.

% emerge --info
Portage 2.2.1 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.10.7-gentoo x86_64)
=================================================================
System uname: Linux-3.10.7-gentoo-x86_64-Intel-R-_Core-TM-_i3_CPU_M_350_@_2.27GHz-with-gentoo-2.2
KiB Mem:     1910312 total,    267836 free
KiB Swap:    8191996 total,   8191996 free
Timestamp of tree: Sun, 08 Sep 2013 15:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r2, 3.2.5-r2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo science proaudio mjoliet
Installed sets: @audio-base, @desktop-apps, @desktop-base, @desktop-misc, @devel-audio, @devel-base, @devel-python, @latex, @local-arthur, @science, @sys-base, @sys-utils
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
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 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=y --nospinner"
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 xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://de-mirror.org/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://mirror.netcologne.de/gentoo/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-s -j5"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9"
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/science /var/lib/layman/pro-audio /usr/local/portage/marcec"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 avahi berkdb branding bzip2 cairo caps cdinstall cjk cli consolekit cracklib crypt css cups cxx dbus dga djvu dri dssi dts dvd encode exif fbcon ffmpeg fftw flac fortran ftp fuse gdbm gif gmp gnuplot gnutls gtk iconv idn imlib inotify ipv6 jack jackmidi jpeg jpeg2k kipi ladspa lapack lash latex lcms libnotify libsamplerate logrotate lzma mad mjpeg mmx mmxext mng modplug modules mp3 mp4 mpeg mudflap multilib musepack musicbrainz ncurses nfs nls nptl ntp offensive ogg openexr opengl openmp opus osc pam pango pcre pdf plotutils png policykit pulseaudio qt4 quicktime rar readline rtsp samba sasl session sid slang smp sndfile speex spell sse sse2 sse3 sse4 ssl ssse3 startup-notification svg sysfs taglib tcpd theora threads tiff timidity truetype unicode usb v4l vaapi vdpau vim-syntax vorbis vpx webkit wma x264 xattr xcb xcomposite xface xft xml xmp xpm xscreensaver xv xvid zeroconf zlib zsh-completion" ABI_X86="64" ALSA_CARDS="hda-intel usb-audio" 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 ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US en en_GB de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel vesa" 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_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Alexander Vershilov (RETIRED) gentoo-dev 2013-09-10 13:51:12 UTC
you need to build ghc with --complete-graph option otherwise emerge fails to set correct build order.
Comment 2 Marc Joliet 2013-09-25 23:30:59 UTC
Sorry for the delay, I was away on holiday and forgot about this bug (plus, I expected more activity).

(In reply to Alexander Vershilov from comment #1)
> you need to build ghc with --complete-graph option otherwise emerge fails to
> set correct build order.

I would be surprised by that, since if that's true, portage only considers the immediate dependencies of the package when triggering a slot rebuild (there are only two levels of dependencies here: the immediate deps of ghc, and *their* inter-dependencies).

Actually, I decided to look at the emerge(1) man page, and found this:

" --rebuild-if-new-slot [ y | n ]
              Automatically rebuild or reinstall packages when slot/sub-slot := operator dependencies can be satisfied by
              a newer slot, so that older packages slots will become eligible for removal by  the  --depclean  action  as
              soon  as  possible.  This option only affects packages that specify slot/sub-slot := dependencies which are
              supported beginning with EAPI 5.  Since this option requires checking of reverse dependencies,  it  enables
              --complete-graph mode whenever a new slot is installed. This option is enabled by default."

So the --complete-graph option should have been set. According to Zac's blog, this option existed in portage-2.1.11.1 (http://blogs.gentoo.org/zmedico/2012/06/23/automatic-rebuilds-with-experimental-eapi-4-slot-abi/). Maybe it didn't imply "--complete-graph" then?
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2014-01-11 15:09:36 UTC
(In reply to Marc Joliet from comment #2)
> Sorry for the delay, I was away on holiday and forgot about this bug (plus,
> I expected more activity).
> 
> (In reply to Alexander Vershilov from comment #1)
> > you need to build ghc with --complete-graph option otherwise emerge fails to
> > set correct build order.
> 
> I would be surprised by that, since if that's true, portage only considers
> the immediate dependencies of the package when triggering a slot rebuild
> (there are only two levels of dependencies here: the immediate deps of ghc,
> and *their* inter-dependencies).
> 
> Actually, I decided to look at the emerge(1) man page, and found this:
> 
> " --rebuild-if-new-slot [ y | n ]
>               Automatically rebuild or reinstall packages when slot/sub-slot
> := operator dependencies can be satisfied by
>               a newer slot, so that older packages slots will become
> eligible for removal by  the  --depclean  action  as
>               soon  as  possible.  This option only affects packages that
> specify slot/sub-slot := dependencies which are
>               supported beginning with EAPI 5.  Since this option requires
> checking of reverse dependencies,  it  enables
>               --complete-graph mode whenever a new slot is installed. This
> option is enabled by default."
> 
> So the --complete-graph option should have been set. According to Zac's
> blog, this option existed in portage-2.1.11.1
> (http://blogs.gentoo.org/zmedico/2012/06/23/automatic-rebuilds-with-
> experimental-eapi-4-slot-abi/). Maybe it didn't imply "--complete-graph"
> then?

Yeah, very likely. We keep encountering minor portage bugs regarding to subslots. All of them are fixed in current portage.

Anyways, h-u explicitely sets --complete-graph now:
https://github.com/gentoo-haskell/haskell-updater/commit/ac39860327f4ab7f401ae9135bb18b85bbeaa324

In rare cases it won't be enough, like in bug #449094, or in cases
where h-u will break more things that cure (due to upgrades deep down in dep chain).

But at least ghc upgrade case should be handled correctly by now.