Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280516 - media-tv/mythtv-0.21_p20877 fails re-emerge/reinstall : incorrect path found in environment file
Summary: media-tv/mythtv-0.21_p20877 fails re-emerge/reinstall : incorrect path found ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords:
: 281630 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-06 00:43 UTC by Richard Dunlap
Modified: 2009-11-08 01:50 UTC (History)
11 users (show)

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


Attachments
Fixed ebuild for mythtv-0.21_p20877 - compatible with updated mythtv eclass (mythtv-0.21_p20877.ebuild,8.97 KB, text/plain)
2009-08-10 21:11 UTC, Paul Sands
Details
Updated, fixed ebuild (mythtv-0.21_p20877-r1.ebuild,8.67 KB, text/plain)
2009-08-13 12:43 UTC, James Broadhead
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Dunlap 2009-08-06 00:43:28 UTC
I'm not sure where this failure is starting, but yesterday I updated to media-tv/mythtv-0.21_p20877 , and today I was trying to finish some other emerge updates, found some library that needed relinking, and found that media-tv/mythtv-0.21_p20877 will not re-emerge/reinstall again :

# emerge -vp  mythtv

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

Calculating dependencies... done!
[ebuild   R   ] media-tv/mythtv-0.21_p20877  USE="aac alsa autostart dvb dvd ieee1394 lcd lirc mmx opengl perl python xvmc (-altivec) -debug -directv -fftw -jack" VIDEO_CARDS="nvidia -via" 0 kB

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

# emerge mythtv

 * IMPORTANT: 3 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) media-tv/mythtv-0.21_p20877
 * mythtv-0.21_p20877.zip RMD160 SHA1 SHA256 size ;-) ...                                                                                                                                                       [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                            [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                           [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                          [ ok ]
 * This ebuild now uses a heavily stripped down version of your CFLAGS
 *
 * For NVIDIA based cards, the XvMC renderer only works on
 * the NVIDIA 4, 5, 6 & 7 series cards.
>>> Unpacking source...
>>> Unpacking mythtv-0.21_p20877.zip to /var/tmp/portage/media-tv/mythtv-0.21_p20877/work
>>> Source unpacked in /var/tmp/portage/media-tv/mythtv-0.21_p20877/work
>>> Preparing source in /var/tmp/portage/media-tv/mythtv-0.21_p20877/work ...
sed: can't read /var/tmp/portage/media-tv/mythtv-0.21_p20877/work/mythtv-0.21_p20877/version.pro: No such file or directory
 *
 * ERROR: media-tv/mythtv-0.21_p20877 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_prepare
 *             environment, line 3923:  Called die
 * The specific snippet of code:
 *       sed -e "s:\`(svnversion 2>\/dev\/null) || echo Unknown\`:${MYTHTV_REV}:" -i "${S}"/version.pro || die "svnversion sed failed";
 *  The die message:
 *   svnversion sed failed
 *
 * 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/media-tv/mythtv-0.21_p20877/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-tv/mythtv-0.21_p20877/temp/environment'.
 *

>>> Failed to emerge media-tv/mythtv-0.21_p20877, Log file:

>>>  '/var/tmp/portage/media-tv/mythtv-0.21_p20877/temp/build.log'

 * Messages for package media-tv/mythtv-0.21_p20877:

 * This ebuild now uses a heavily stripped down version of your CFLAGS
 *
 * For NVIDIA based cards, the XvMC renderer only works on
 * the NVIDIA 4, 5, 6 & 7 series cards.
 *
 * ERROR: media-tv/mythtv-0.21_p20877 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_prepare
 *             environment, line 3923:  Called die
 * The specific snippet of code:
 *       sed -e "s:\`(svnversion 2>\/dev\/null) || echo Unknown\`:${MYTHTV_REV}:" -i "${S}"/version.pro || die "svnversion sed failed";
 *  The die message:
 *   svnversion sed failed
 *
 * 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/media-tv/mythtv-0.21_p20877/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-tv/mythtv-0.21_p20877/temp/environment'.
 *

Tracing backwards, the /var/tmp/portage/media-tv/mythtv-0.21_p20877/temp/environment has the following reference, later used by the 'sed' line that is failing:

   S=/var/tmp/portage/media-tv/mythtv-0.21_p20877/work/mythtv-0.21_p20877

However, it should be this:

   S=/var/tmp/portage/media-tv/mythtv-0.21_p20877/work/branches/release-0-21-fixes/mythtv

I'm not an expert in portage so I couldn't figure out what script is populating that 'S' value into the environment file each time.


Reproducible: Always

Steps to Reproduce:
Best as I can tell :
1. emerge mythtv
2. emerge mythtv   (reinstall)

(Note, I have not unmerge and re-emerge)
Comment 1 James Earl Spahlinger 2009-08-06 00:58:11 UTC
Please paste the output of 'emerge --info' into a bugzilla comment to assist the maintainers in resolving this issue
Comment 2 Richard Dunlap 2009-08-06 14:52:39 UTC
emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.3.2,
glibc-2.9_p20081201-r2, 2.6.28-gentoo-r1 i686)
=================================================================
System uname:
Linux-2.6.28-gentoo-r1-i686-Intel-R-_Core-TM-2_CPU_6400_@_2.13GHz-with-glibc2.0
Timestamp of tree: Thu, 06 Aug 2009 00:30:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.8-r1
dev-lang/python:     2.4.4-r13, 2.5.4-r3
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 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.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /home/mythtv/ /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/
/etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d
/etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms
strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="PHP X a52 aac acl acpi alsa amr apache2 autostart avi berkdb bluetooth
branding bzip2 cairo cdr cgi cli cracklib crypt cscope cups dbus divx dri dts
dv dvb dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox flac gdbm
gif gpm gstreamer gtk gtk2 hal httpd iconv ieee1394 imlib isdnlog java joystick
jpeg lcd libnotify lirc lm_sensors logrotate mad matroska mikmod mjpeg mmx
mozilla mp3 mpeg mplayer mudflap mysql mythtv ncurses net nptl nptlonly ogg
oggvorbis opengl openmp pam pcre pdf perl png posix ppds pppd python qt qt3
qt3support qt4 quicktime readline reflection sdl server session spell spl sse
sse2 ssl startup-notification stream svg sysfs tcpd theora threads tiff
transcode truetype unicode usb v4l2 vcd vcdi vorbis win32codecs x86 xine
xinerama xml xmms xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000
atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env
expires ext_filter file_cache filter headers ident imagemap include info
log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp
proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status
unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard
mouse evdev" KERNEL="linux" LCD_DEVICES="imon" LIRC_DEVICES="imon_pad2keys"
USERLAND="GNU" VIDEO_CARDS="nvidia video_cards_nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG,
LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS,
PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 James Broadhead 2009-08-07 01:04:12 UTC
This is a duplicate of bug #279119
Comment 4 Richard Dunlap 2009-08-07 17:46:00 UTC
(In reply to comment #3)
> This is a duplicate of bug #279119

I can't tell if the fix in bug #279119 has been rolled to p20877.  Will try emerge again on Monday.
Comment 5 Stafford Brunk 2009-08-09 17:02:26 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > This is a duplicate of bug #279119
> 
> I can't tell if the fix in bug #279119 has been rolled to p20877.  Will try
> emerge again on Monday.
> 

The opposite of bug 279119 is true in this instance.  portage is looking for version.pro in /var/tmp/portage/media-tv/mythtv-0.21_p20877/work/mythtv-0.21_p20877/version.pro but it actually exists in /var/tmp/portage/media-tv/mythtv-0.21_p20877/work/branches/release-0-21-fixes/mythtv/version.pro
Comment 6 Richard Dunlap 2009-08-10 05:22:53 UTC
Just looked at this.  Doesn't appear to be any change to this package.  Tried emerge --sync and emerge mythtv, still broken.
Comment 7 Paul Sands 2009-08-10 21:07:19 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > This is a duplicate of bug #279119
> > 
> > I can't tell if the fix in bug #279119 has been rolled to p20877.  Will try
> > emerge again on Monday.
> > 
> The opposite of bug 279119 is true in this instance.  portage is looking for
> version.pro in
> /var/tmp/portage/media-tv/mythtv-0.21_p20877/work/mythtv-0.21_p20877/version.pro
> but it actually exists in
> /var/tmp/portage/media-tv/mythtv-0.21_p20877/work/branches/release-0-21-fixes/mythtv/version.pro

Looks like due to changes in the mythtv eclass, the build environment does not know where to look for the files in the work directory.

To fix mythtv-0.21_p20877(not a permanent solution) you can edit the ebuild and add the following to the src_prepare section:

src_prepare() {
S="${WORKDIR}/$MYTHTV_REPO}"
cd $S

re-digest the ebuild and it will compile. Redefining S sets the correct directory for the unpacked files and the cd $S sets the correct directory to allow patches to be applied.
Comment 8 Paul Sands 2009-08-10 21:11:46 UTC
Created attachment 200869 [details]
Fixed ebuild for mythtv-0.21_p20877 - compatible with updated mythtv eclass
Comment 9 Paul Sands 2009-08-10 21:15:27 UTC
(In reply to comment #8)
> Created an attachment (id=200869) [edit]
> Fixed ebuild for mythtv-0.21_p20877 - compatible with updated mythtv eclass

Added a corrected ebuild as a temporary work-around.

It also appears that the mythtv eclass is not passing the correct value for $S. I did a check and it is pointing to the old ${WORKDIR}/{P} instead of the new ${WORKDIR}/${MYTHTV_REPO}. (can check by inserting echo $S into the src_prepare section of the current ebuild in the portage tree).
Comment 10 Richard Dunlap 2009-08-11 01:02:56 UTC
Made manually change to ebuild, including correcting the line by adding a '{'  :

     S="${WORKDIR}/${MYTHTV_REPO}"

Confirmed ebuild does successfully emerge with change.
Comment 11 James Broadhead 2009-08-13 12:43:24 UTC
Created attachment 201122 [details]
Updated, fixed ebuild

Should obsolete previous updated ebuild
Comment 12 Mark Knecht 2009-08-18 20:59:28 UTC
This is still failing for me. Has the fix been pushed out for us normal user types yet?

Thanks!


>>> Failed to emerge media-tv/mythtv-0.21_p20877, Log file:

>>>  '/var/tmp/portage/media-tv/mythtv-0.21_p20877/temp/build.log'

 * Messages for package media-tv/mythtv-0.21_p20877:

 * This ebuild now uses a heavily stripped down version of your CFLAGS
 * 
 * ERROR: media-tv/mythtv-0.21_p20877 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_prepare
 *             environment, line 4008:  Called die
 * The specific snippet of code:
 *       sed -e "s:\`(svnversion 2>\/dev\/null) || echo Unknown\`:${MYTHTV_REV}:" -i "${S}"/version.pro || die "svnversion sed failed";
 *  The die message:
 *   svnversion sed failed
 * 
 * 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/media-tv/mythtv-0.21_p20877/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-tv/mythtv-0.21_p20877/temp/environment'.
 * 
Comment 13 Keith Harrison 2009-08-18 21:47:42 UTC
mythtv-0.21_p20877-r1.ebuild works for me.  Thanks!

Mark, this is not in portage yet.  I had to use a local portage overlay.
Comment 14 Bruce M 2009-08-21 20:06:37 UTC
(In reply to comment #7)
> add the following to the src_prepare section:
> 
> src_prepare() {
> S="${WORKDIR}/$MYTHTV_REPO}"
> cd $S

Note the missing "{". Should be "${MYTHTV_REPO}".
Comment 15 Matthias Dahl 2009-08-23 09:04:01 UTC
Simply revert the following:

http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mythtv.eclass?r1=1.15&r2=1.16

I have absolutely no idea what gentoofan23 wanted to achieve with this but since it was his first commit to the eclass, I guess something went wrong. I checked for mythtv and mythtv-themes (alpha and fixes), the source redefinition is always correct and required.

Could someone official please fix this?
Comment 16 Gregg Casillo 2009-08-24 17:39:39 UTC
James' ebuild in comment #11 works for me. Thanks!
Comment 17 Robert Bradbury 2009-08-25 13:42:26 UTC
I'd like to second the vote for fixing this in the (beta / alpha) "production" release.  There are some of us who update almost daily and will encounter bugs like this within days of their release but who really don't like having to reread the ebuild documentation to apply a local portage overlay when people provide patches (a single utility to "apply local overlay patches" would be nice!).  According to the ebuild file dates, version 20877 broke around July 19 and 20959 (Bug #281630) broke around July 27.  The fix to version 19961 was apparently released August 16, but that version is 3+ months old.  (Mythtv is in a relatively active state of development and presumably one can expect monthly updates -- so it ought to receive a bit more attention.)

In the meantime adding the single line ">=media-tv/mythtv-0.21_p20877" to package.mask seems to avoid the hassle of applying local patches (once you apply a local patch how do you known when to "unapply" it?)
Comment 18 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2009-08-25 16:54:09 UTC
+  25 Aug 2009; Thomas Anderson <gentoofan23@gentoo.org>                                                                                                                              
+  mythtv-0.21_p18314-r1.ebuild, mythtv-0.21_p18314-r2.ebuild,                                                                                                                        
+  mythtv-0.21_p19961-r1.ebuild, mythtv-0.21_p19961-r2.ebuild:                                                                                                                        
+  Make all ebuilds use mythtv.eclass' SRC_URI, fixing bug #280516. Convert                                                                                                           
+  mythtv-0.21_p18314-r* to EAPI 2 for SRC_URI arrows. Adjust all ebuilds to                                                                                                          
+  call source preparation commands in src_prepare as they should be in EAPI                                                                                                          
+  2.                                                                                                                                                                                 
+                                                                                                                                                               

My original 'fix only fixed stable ebuilds as that was all I could test. Recent commits have fixed all of the ebuilds. Thanks for the report and sorry for that hiccup. Please reopen if you continue to have issues.
Comment 19 Doug Goldstein (RETIRED) gentoo-dev 2009-11-08 01:50:10 UTC
*** Bug 281630 has been marked as a duplicate of this bug. ***