Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 573794 - app-text/xindy-2.4 installs buggy /usr/lib64/xindy/modules/tex/inputenc/latin.xdy
Summary: app-text/xindy-2.4 installs buggy /usr/lib64/xindy/modules/tex/inputenc/latin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: TeX project
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2016-02-03 17:02 UTC by Bernd
Modified: 2017-02-07 12:08 UTC (History)
2 users (show)

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


Attachments
Add option -a to grep (xindy-2.4-grep.patch,380 bytes, patch)
2016-02-04 20:07 UTC, Martin Väth
Details | Diff
Replace grep by sed (xindy-2.4-nogrep.patch,399 bytes, patch)
2017-02-06 13:57 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd 2016-02-03 17:02:11 UTC
After syncing the portage tree today, dev-tex/xcolor-2.11 came up with a newly available doc USE flag. I tried to re-emerge the package with the use flag enabled, but it failed with the error:

Call stack:
    ebuild.sh, line  133:  Called src_install
  environment, line 2213:  Called latex-package_src_install
  environment, line 1532:  Called latex-package_src_doinstall 'all'
  environment, line 1523:  Called latex-package_src_doinstall 'styles' 'fonts' 'bin' 'doc'
  environment, line 1514:  Called latex-package_src_doinstall 'tex' 'dtx' 'dvi' 'ps' 'pdf'
  environment, line 1478:  Called die
The specific snippet of code:
                          texi2dvi -q -c --language=latex $i &> /dev/null || die;

I compiled the package again (using ebuild) and tried the texi2dvi command mentioned in the logfile, omitting the quiet (-q) option. The following error came up:

Opening logfile "/dev/null" (done)
Reading indexstyle...
Loading module "/tmp/.private/root/2ycRQxOFOc"...
Loading module "lang/general/latin9-lang.xdy"...
Loading module "lang/general/latin9.xdy"...
Finished loading module "lang/general/latin9.xdy".
Finished loading module "lang/general/latin9-lang.xdy".
Loading module "tex/inputenc/latin.xdy"...

Error in line 3:
;; Generated from latin?.xdy

Binary 
ERROR: EVAL: variable BINARY has no value
/usr/bin/texi2dvi: texindy failed

The file latin.xdy contains 3 lines only:

artus xcolor # cat /usr/lib64/xindy/modules/tex/inputenc/latin.xdy 
;; Generated from latin?.xdy

Binary file (standard input) matches

Comparing the file to other files in the directory, this doesn't look like a valid xdy file to me.

If I comment out line 3, the texi2dvi command succeeds and I can emerge dev-tex/xcolor-2.11.

Another issue with app-text/xindy-2.4 is the placement of various doc files, if the doc use flag is enabled:

artus portage # equery files xindy | grep doc
/usr/share/doc
/usr/share/doc/xindy
/usr/share/doc/xindy-2.4
/usr/share/doc/xindy-2.4/AUTHORS.bz2
/usr/share/doc/xindy-2.4/ChangeLog.Gour.bz2
/usr/share/doc/xindy-2.4/NEWS.bz2
/usr/share/doc/xindy-2.4/README.bz2
/usr/share/doc/xindy/README
/usr/share/doc/xindy/alphabets-doc.pdf
/usr/share/doc/xindy/dataflow.gif
/usr/share/doc/xindy/faq-1.html
/usr/share/doc/xindy/faq-2.html
...

The standard documentation files are placed within /usr/share/doc/${PV}, but most of them are placed within /usr/share/doc/${PN}. Shouldn't they all belong to the /usr/share/doc/${PV} directory?

Output of emerge --info:
Portage 2.2.26 (python 3.4.3-final-0, default/linux/amd64/13.0/systemd, gcc-4.9.3, glibc-2.21-r1, 4.1.15-gentoo-r1-0 x86_64)
=================================================================
System uname: Linux-4.1.15-gentoo-r1-0-x86_64-AMD_FX-tm-8350_Eight-Core_Processor-with-gentoo-2.2
KiB Mem:    16332024 total,   2952492 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Wed, 03 Feb 2016 12:00:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

local
    location: /usr/local/portage
    masters: gentoo
    priority: 10

enlightenment
    location: /var/lib/layman/enlightenment
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/enlightenment.git
    masters: gentoo
    priority: 50

gamerlay
    location: /var/lib/layman/gamerlay
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/gamerlay.git
    masters: gentoo
    priority: 50

games-overlay
    location: /var/lib/layman/games-overlay
    sync-type: laymansync
    sync-uri: git://github.com/hasufell/games-overlay.git
    masters: gentoo
    priority: 50

haskell
    location: /var/lib/layman/haskell
    sync-type: laymansync
    sync-uri: git://github.com/gentoo-haskell/gentoo-haskell.git
    masters: gentoo
    priority: 50

multimedia
    location: /var/lib/layman/multimedia
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/multimedia.git
    masters: gentoo
    priority: 50

octave
    location: /var/lib/layman/octave
    sync-type: laymansync
    sync-uri: git://github.com/rafaelmartins/octave-overlay.git
    masters: gentoo
    priority: 50

prism-overlay
    location: /var/lib/layman/prism-overlay
    sync-type: laymansync
    sync-uri: git://github.com/hasufell/prism-overlay.git
    masters: gentoo
    priority: 50

qt
    location: /var/lib/layman/qt
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/qt.git
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/sci.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

sunrise
    location: /var/lib/layman/sunrise
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/sunrise-reviewed.git
    masters: gentoo
    priority: 50

wine-a-holics
    location: /var/lib/layman/wine-a-holics
    sync-type: laymansync
    sync-uri: git://github.com/NP-Hardass/wine-a-holics.git
    masters: gentoo
    priority: 50

neurogentoo
    location: /usr/local/src/neurogentoo
    sync-type: git
    sync-uri: https://github.com/TheChymera/neurogentoo.git
    masters: gentoo
    priority: 8888

Installed sets: @android-zeugs, @cde, @claws, @dev-tools, @doc-tools, @docs, @fonts, @haskell-platform, @langs, @my_latex, @netz-zeugs, @nvidia-zeugs, @qt5-addons, @qt5-essentials, @qt5-tools, @steam, @vcs, @web, @xfce
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/grs/systems.conf /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /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=native"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps n --complete-graph --jobs=1 --keep-going"
FCFLAGS="-O2 -pipe -march=native"
FEATURES="assume-digests binpkg-logs buildpkg candy cgroup clean-logs config-protect-if-modified distlocks downgrade-backup ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.halifax.rwth-aachen.de/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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="/tmp"
USE="X acl alsa amd64 bindist bzip2 cli cracklib crypt cxx dri fortran gdbm gif iconv ipv6 jpeg mmx mmxext modules multilib ncurses nls nptl offensive opengl openmp pam pcre pic png policykit pulseaudio readline seccomp session sse sse2 ssl svg systemd tcpd threads tiff udev unicode xattr 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="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver" LINGUAS="de de_DE en en_GB en_US" NGINX_MODULES_HTTP="access addition auth_basic auth_pam autoindex browser cache_purge charset dav dav_ext echo empty_gif fancyindex fastcgi flv geo geoip gunzip gzip headers_more image_filter limit_conn limit_req map memc memcached metrics mp4 naxsi proxy push_stream realip referer rewrite scgi secure_link slowfs_cache split_clients ssi sticky stub_status sub upload_progress upstream_check upstream_ip_hash userid uwsgi xslt" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm armeb i386 x86_64" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="dummy fbdev nvidia 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Martin Väth 2016-02-04 20:07:16 UTC
Created attachment 424616 [details, diff]
Add option -a to grep

The reason for the breakage is the horrible autodetection of current versions of GNU grep for binary files.

One should perhaps mask GNU grep for doing such a BS by default ... :(

Anyhow, adding -a to grep when generating latin.xdy fixes the problem.
The attached patch does this.

I suppose that the grep option -a is non-standard, so it might possibly fail on systems not having GNU grep in their $PATH first...
Comment 2 Bernd 2016-08-06 07:32:34 UTC
Sorry for the delay, I must have missed the email somehow.

I checked this again with the proposed patch and it works as intended, also  xcolor compiles without errors.
Comment 3 Oleh 2017-02-06 10:01:48 UTC
can this get fix. patch works.
Comment 4 Ulrich Müller gentoo-dev 2017-02-06 13:56:01 UTC
We don't require GNU grep in ebuild context, and POSIX grep doesn't know about the -a option:

SYNOPSIS
       grep [−E|−F] [−c|−l|−q] [−insvx] −e pattern_list
           [−e pattern_list]... [−f pattern_file]... [file...]

       grep [−E|−F] [−c|−l|−q] [−insvx] [−e pattern_list]...
           −f pattern_file [−f pattern_file]... [file...]

       grep [−E|−F] [−c|−l|−q] [−insvx] pattern_list [file...]
Comment 5 Ulrich Müller gentoo-dev 2017-02-06 13:57:57 UTC
Created attachment 462612 [details, diff]
Replace grep by sed

Using sed rather than grep may work though. See attached (untested) patch.
Comment 6 Oleh 2017-02-06 15:42:49 UTC
sed fix  works.
Comment 8 Ulrich Müller gentoo-dev 2017-02-06 19:57:01 UTC
Reported upstream: https://sourceforge.net/p/xindy/bugs/60/