Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262428 - sys-apps/portage-2.1.6.7 - ebuild tries to re-apply patches in src_prepare when src_prepare has already been run
Summary: sys-apps/portage-2.1.6.7 - ebuild tries to re-apply patches in src_prepare wh...
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:
Depends on:
Blocks: 210077 261959
  Show dependency tree
 
Reported: 2009-03-14 12:46 UTC by Pacho Ramos
Modified: 2009-03-18 08:04 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 Pacho Ramos gentoo-dev 2009-03-14 12:46:18 UTC
Maybe this is because ebuild doesn't behave ok when EAPI=2 is being used for applying patches in src_prepare phase.

When I run:
# ebuild  mono-2.2-r3.ebuild install
>>> Existing ${T}/environment for 'mono-2.2-r3' will be sourced. Run
>>> 'clean' to start with a fresh environment.
 * mono-2.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                   [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                  [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                 [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                [ ok ]
 * checking mono-2.2.tar.bz2 ;-) ...                                                                                                                  [ ok ]
>>> Checking mono-2.2.tar.bz2's mtime...
>>> WORKDIR is up-to-date, keeping...
 * Applying mono-2.2-libdir126.patch ...

 * Failed Patch: mono-2.2-libdir126.patch !
 *  ( /var/tmp/portage/dev-lang/mono-2.2-r3/work/mono-2.2-libdir126.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/dev-lang/mono-2.2-r3/temp/mono-2.2-libdir126.patch-20919.out

 * 
 * ERROR: dev-lang/mono-2.2-r3 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_prepare
 *             environment, line 3094:  Called go-mono_src_prepare
 *             environment, line 2162:  Called base_src_util 'autopatch'
 *             environment, line  533:  Called epatch '/var/tmp/portage/dev-lang/mono-2.2-r3/work/mono-2.2-libdir126.patch'
 *             environment, line 1563:  Called die
 * The specific snippet of code:
 *                   die "Failed Patch: ${patchname}!";
 *  The die message:
 *   Failed Patch: mono-2.2-libdir126.patch!
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-lang/mono-2.2-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/mono-2.2-r3/temp/environment'.
 * 

This is "logical" because ebuild is re-running src_prepare phase even when it's keeping WORKDIR, then, src_prepare is trying to apply patches on a WORKDIR that has the patches already applied

My emerge --info:
Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.28-tuxonice-r4 x86_64)
=================================================================
System uname: Linux-2.6.28-tuxonice-r4-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-glibc2.2.5
Timestamp of tree: Sat, 14 Mar 2009 12:00:17 +0000
distcc 3.0 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona -fomit-frame-pointer"
DISTDIR="/usr/distfiles"
FEATURES="autoaddcvs ccache collision-protect cvs distlocks fixpackages multilib-strict parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org"
LANG="es_ES.UTF-8"
LC_ALL="es_ES.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="es es_ES en_US"
MAKEOPTS="-j3"
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/layman/sunrise /usr/local/portage/layman/wschlich-testing /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amr avahi bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdparanoia cdr cleartype cli consolekit cracklib crypt css cups daap dbus dell dirac divx djvu dts dvd dvdr dvdread dvi eds emboss emovix encode epiphany evo exif fam fbcondecor fbsplash ffmpeg flac fortran fuse galago gdbm gif glitz gmedia gnome gnome-keyring gpm gsm gstreamer gtk hal iconv ieee1394 ipv6 isdnlog java java6 jpeg jpeg2k kdeenablefinal kdehiddenvisibility kpathsea laptop latex lcms ldap libnotify lzma mad midi mikmod mjpeg mmx mmxext mono moonlight mp3 mpeg mudflap multilib musepack musicbrainz nautilus ncurses network network-cron networkmanager nls nptl nptlonly ntp ogg opengl openmp pam pango pch pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline realmedia reflection scanner schroedinger sdl session smp sms speex spell spl sse sse2 sse3 ssl ssse3 startup-notification svg sysfs t1lib tcpd theora threads tiff totem truetype unicode usb v4l2 vcd vorbis webkit wmf wmp x264 xattr xcb xft xinetd xml xmp xorg xulrunner xv xvid zeroconf zlib" ALSA_CARDS="hda-intel" 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es es_ES en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



Reproducible: Always
Comment 1 Peter Alfredsen (RETIRED) gentoo-dev 2009-03-14 15:41:49 UTC
I can't reproduce with portage-2.2_rc24
Can you try to reproduce with:
ebuild $ebuild clean prepare
ebuild $ebuild install

pa@loki ~/Desktop/Downloads $ ebuild /usr/portage/dev-lang/mono/mono-2.2-r3.ebuild clean prepare
 * mono-2.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                                                                                                   [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                                                  [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                                                 [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                                                [ ok ]
 * checking mono-2.2.tar.bz2 ;-) ...                                                                                                                                                                                                  [ ok ]
>>> Unpacking source...
>>> Unpacking mono-2.2.tar.bz2 to /var/tmp/portage/dev-lang/mono-2.2-r3/work
>>> Source unpacked in /var/tmp/portage/dev-lang/mono-2.2-r3/work
>>> Preparing source in /var/tmp/portage/dev-lang/mono-2.2-r3/work/mono-2.2 ...
 * Applying mono-2.2-libdir126.patch ...                                                                                                                                                                                               [ ok ]
 * Applying mono-2.2-ppc-threading.patch ...                                                                                                                                                                                           [ ok ]
 * Applying mono-2.2-uselibdir.patch ...                                                                                                                                                                                               [ ok ]
 * Applying mono-2.2-r121596-work-around-runtime-crash.patch ...                                                                                                                                                                       [ ok ]
 * Applying mono-2.2-r123987-bless-crash.patch ...                                                                                                                                                                                     [ ok ]
>>> Source prepared.
pa@loki ~/Desktop/Downloads $ ebuild /usr/portage/dev-lang/mono/mono-2.2-r3.ebuild install
>>> Existing ${T}/environment for 'mono-2.2-r3' will be sourced. Run
>>> 'clean' to start with a fresh environment.
 * mono-2.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                                                                                                   [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                                                  [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                                                 [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                                                [ ok ]
 * checking mono-2.2.tar.bz2 ;-) ...                                                                                                                                                                                                  [ ok ]
>>> Checking mono-2.2.tar.bz2's mtime...
>>> WORKDIR is up-to-date, keeping...
>>> It appears that 'mono-2.2-r3' is already prepared; skipping.
>>> Remove '/var/tmp/portage/dev-lang/mono-2.2-r3/.prepared' to force prepare.
>>> Configuring source in /var/tmp/portage/dev-lang/mono-2.2-r3/work/mono-2.2 ...
 * econf: updating mono-2.2/libgc/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating mono-2.2/libgc/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating mono-2.2/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating mono-2.2/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-dependency-tracking --disable-static --disable-quiet-build --with-preview --with-glib=system --with-moonlight --with-libgdiplus=installed --without-xen_opt --without-ikvm-native --with-jit
Comment 2 Pacho Ramos gentoo-dev 2009-03-17 19:43:07 UTC
Fails here with current stable portage:
# ebuild mono-2.2-r3.ebuild clean prepare
 * mono-2.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                   [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                  [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                 [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                [ ok ]
 * checking mono-2.2.tar.bz2 ;-) ...                                                                                                                  [ ok ]
>>> Unpacking source...
>>> Unpacking mono-2.2.tar.bz2 to /var/tmp/portage/dev-lang/mono-2.2-r3/work
>>> Source unpacked in /var/tmp/portage/dev-lang/mono-2.2-r3/work
 * Applying mono-2.2-libdir126.patch ...                                                                                                               [ ok ]
 * Applying mono-2.2-ppc-threading.patch ...                                                                                                           [ ok ]
 * Applying mono-2.2-uselibdir.patch ...                                                                                                               [ ok ]
 * Applying mono-2.2-r121596-work-around-runtime-crash.patch ...                                                                                       [ ok ]
 * Applying mono-2.2-r123987-bless-crash.patch ...                                                                                                     [ ok ]
belkin3 mono # ebuild mono-2.2-r3.ebuild install
>>> Existing ${T}/environment for 'mono-2.2-r3' will be sourced. Run
>>> 'clean' to start with a fresh environment.
 * mono-2.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                   [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                  [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                 [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                [ ok ]
 * checking mono-2.2.tar.bz2 ;-) ...                                                                                                                  [ ok ]
>>> Checking mono-2.2.tar.bz2's mtime...
>>> WORKDIR is up-to-date, keeping...
 * Applying mono-2.2-libdir126.patch ...

 * Failed Patch: mono-2.2-libdir126.patch !
 *  ( /var/tmp/portage/dev-lang/mono-2.2-r3/work/mono-2.2-libdir126.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/dev-lang/mono-2.2-r3/temp/mono-2.2-libdir126.patch-21941.out

 * 
 * ERROR: dev-lang/mono-2.2-r3 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_prepare
 *             environment, line 3092:  Called go-mono_src_prepare
 *             environment, line 2160:  Called base_src_util 'autopatch'
 *             environment, line  531:  Called epatch '/var/tmp/portage/dev-lang/mono-2.2-r3/work/mono-2.2-libdir126.patch'
 *             environment, line 1561:  Called die
 * The specific snippet of code:
 *                   die "Failed Patch: ${patchname}!";
 *  The die message:
 *   Failed Patch: mono-2.2-libdir126.patch!
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-lang/mono-2.2-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/mono-2.2-r3/temp/environment'.
 * 
Comment 3 Peter Alfredsen (RETIRED) gentoo-dev 2009-03-17 21:31:03 UTC
Could someone try portage-2.1.6.8 and see if that has a fix for this?
Comment 4 Zac Medico gentoo-dev 2009-03-17 21:48:57 UTC
This should be fixed in 2.1.6.8 and 2.2_rc24:

  http://sources.gentoo.org/viewcvs.py/portage?rev=12795&view=rev
Comment 5 Pacho Ramos gentoo-dev 2009-03-18 08:04:38 UTC
Great :-D