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

Bug 70509

Summary: patch to latex-package.class to make ebuilds with no $DOC variable install
Product: Gentoo Linux Reporter: Alexandre Vaissiere <the_starch>
Component: [OLD] DevelopmentAssignee: Text-Markup Team (OBSOLETE) <text-markup+disabled>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch to make latex-package_src_install work correctly

Description Alexandre Vaissiere 2004-11-08 14:51:20 UTC
the function latex-package_src_install() doesn't return a true value when $DOCS variable is empty. Look in the function code. We test the emptyness of $DOCS variable :
- if $DOCS is not empty, we execute dodoc and return its return value
- if $DOCS is empty, we return the result of the test, ie false.

latex-package_src_install() {
        debug-print function $FUNCNAME $*
        latex-package_src_doinstall all
        [ -n "${DOCS}" ] && dodoc ${DOCS}
}

So, if the ebuild contains latex-package_src_install || die (as the dev-tex/xcolor-2.0.0.ebuild) and no $DOCS variable is supplied, the ebuild won't install although it was no error.

I suggest correcting this function like this :

--- /usr/portage/eclass/latex-package.eclass.old        2004-11-08 22:59:53.740093712 +0100
+++ /usr/portage/eclass/latex-package.eclass    2004-11-08 23:45:05.954774408 +0100
@@ -146,7 +146,7 @@
 latex-package_src_install() {
        debug-print function $FUNCNAME $*
        latex-package_src_doinstall all
-       [ -n "${DOCS}" ] && dodoc ${DOCS}
+       [ -z "${DOCS}" ] || dodoc ${DOCS}
 }
 
 latex-package_pkg_postinst() {


Reproducible: Always
Steps to Reproduce:
1. emerge dev-tex/xcolor


Actual Results:  
 emerge xcolor
Calculating dependencies  ...done!
>>> emerge (1 of 1) dev-tex/xcolor-2.00 to /
>>> md5 src_uri ;-) xcolor200.zip
>>> Unpacking source...
>>> Unpacking xcolor200.zip to /var/tmp/portage/xcolor-2.00/work
>>> Source unpacked.
 * Extracting from /var/tmp/portage/xcolor-2.00/work/xcolor/xcolor.ins
>>> Test phase [not enabled]: dev-tex/xcolor-2.00

>>> Install xcolor-2.00 into /var/tmp/portage/xcolor-2.00/image/ category dev-tex
 * Making documentation: ./xcolor1.tex
 * Making documentation: ./xcolor2.tex
 * Making documentation: ./xcolor3.tex
 * Making documentation: ./xcolor.dtx

!!! ERROR: dev-tex/xcolor-2.00 failed.
!!! Function src_install, Line 26, Exitcode 1
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.


Portage 2.0.51-r3 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.6.7-gentoo-r10 i686)
=================================================================
System uname: 2.6.7-gentoo-r10 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.14.90.0.8-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-tbird -mcpu=athlon-tbird -Os -mmmx -m3dnow
-fstrength-reduce -pipe -fomit-frame-pointer -finline-functions -fgcse
-freduce-all-givs"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/terminfo /etc/wget
/usr/X11R6/lib/X11/xkb /etc/env.d"
CXXFLAGS="-march=athlon-tbird -mcpu=athlon-tbird -Os -mmmx -m3dnow
-fstrength-reduce -pipe -fomit-frame-pointer -finline-functions -fgcse
-freduce-all-givs"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs candy ccache distlocks sandbox"
GENTOO_MIRRORS="ftp://cs.ubishops.ca/pub/gentoo/ http://gentoo.oregonstate.edu
ftp://ftp.irisa.fr/pub/gentoo-sources
http://www.ibiblio.org/pub/Linux/distributions/gentoo
ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.oregonstate.edu"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib acpi alsa apache2 avi berkdb bitmap-fonts chroot crypt cups
dga directfb dv dvb dvd emacs encode f77 faad fbcon flash foomaticdb fortran gd
gdbm gif glut gpm gtk gtk2 imagemagick imlib java jikes jpeg justify ldap libg++
libwww mad mmx motif mpeg mule mysql ncurses nls nptl nvidia oggvorbis opengl 
openssh oss pam pdflib perl png postgres ppds python quicktime readline sdl
slang spell ssl svga tcltk tcpd tetex tiff transcode truetype usb vhosts videos
x86 xml xml2 xmms xv zlib video_cards_nvidia"
Comment 1 Alexandre Vaissiere 2004-11-08 14:54:47 UTC
Created attachment 43554 [details, diff]
patch to make latex-package_src_install work correctly

i'm not very familiar with patches creation, so if i've done crap, i'm sorry
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-08-20 05:20:13 UTC
Re-assign, misassigned to retired dev.
Comment 3 Martin Ehmsen (RETIRED) gentoo-dev 2006-01-24 06:44:03 UTC

*** This bug has been marked as a duplicate of 70799 ***