Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via or IRC
Bug 670224 - app-portage/esearch - eupdataedb is not handling backslashes in ebuild description correctly
Summary: app-portage/esearch - eupdataedb is not handling backslashes in ebuild descri...
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Portage Tools Team
: 737408 (view as bug list)
Depends on:
Reported: 2018-11-03 22:46 UTC by Martin DiViaio
Modified: 2020-08-16 20:54 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Martin DiViaio 2018-11-03 22:46:44 UTC
eupdatedb is generating python code in /var/cache/edb/ When an ebuild description contains a backslash like:

DESCRIPTION="Reading, writing and manipulating \\"

The resulting code in /var/cache/edb/ us invalid and this will effectively break esearch since it will always return the following error:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/esearch", line 5, in <module>
  File "/usr/lib64/python3.6/site-packages/esearch/", line 529, in main
    db = loaddb(config)
  File "/usr/lib64/python3.6/site-packages/esearch/", line 172, in loaddb
    from esearchdb import db
  File "/var/cache/edb/", line 5077
    ('tar', 'dev-haskell/tar', False, '', '', '38 kB', '', 'Reading, writing and manipulating \', 'BSD'),

Reproducible: Always

Steps to Reproduce:

Install the haskell overlay or create an ebuild that has '\\' at the end of the description.

Run eupdatedb.

It will throw the same error noted above and from then on esearch will not work.
Actual Results:  

Both eupdatedb and esearch throw errors.

Expected Results:  

Generate correct code in /var/cache/edb/

Most likely, it needs to escape '\' in the generated code.
Comment 1 Martin DiViaio 2018-11-03 22:48:27 UTC
emerge --info app-portage/esearch

Portage 2.3.51 (python 3.6.6-final-0, default/linux/amd64/17.0/systemd, gcc-7.3.0, glibc-2.27-r6, 4.13.12-gentoo x86_64)
                         System Settings
System uname: Linux-4.13.12-gentoo-x86_64-AMD_FX-tm-6300_Six-Core_Processor-with-gentoo-2.6
KiB Mem:    32862808 total,  16185048 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Sat, 03 Nov 2018 11:24:29 +0000
Head commit of repository gentoo: 850d7fa8ed9dbf5c672dd8571078d8574c00b016

Head commit of repository grub2-themes: 32fa98beaeef0c0056fa5ef9f600598a32d3aca4

Head commit of repository haskell: 5ca946fc1c0551429b816d09241f2d0e2564a692

Head commit of repository java: 22b1d35cc4be3dc33bbb6592c5989a15e5d8c4b2

Head commit of repository science: b8571e136f0c12b108b260ddc4155b6b1be2609a

Head commit of repository x11: c76981fdd31fbc70db2ff44814e4d7dfe7e71ba0

Head commit of repository xfce-dev: 89362598ddebb06cffd41686f73b640fa29d7ed9

Head commit of repository steam-overlay: 81325bfb1a2d0650a1f187b1e9f8274482457ee6

sh bash 4.4_p23
ld GNU ld (Gentoo 2.31.1 p3) 2.31.1
app-shells/bash:          4.4_p23::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.6::gentoo
dev-util/cmake:           3.12.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r1::gentoo
sys-devel/gcc:            7.3.0-r6::gentoo, 8.2.0-r4::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo

    location: /usr/portage
    sync-type: git
    priority: -1000

    location: /var/lib/portage-overlays/g-cpan
    masters: gentoo

    location: /var/lib/portage-overlays/overlay-gentoo-grub2-themes
    sync-type: git
    sync-uri: git://
    masters: gentoo

    location: /var/lib/portage-overlays/overlay-gentoo-haskell
    sync-type: git
    sync-uri: git://
    masters: gentoo

    location: /var/lib/portage-overlays/overlay-java
    sync-type: git
    sync-uri: git://
    masters: gentoo

    location: /var/lib/portage-overlays/overlay-science
    sync-type: git
    sync-uri: git://
    masters: gentoo

    location: /var/lib/portage-overlays/overlay-x11
    sync-type: git
    sync-uri: git://
    masters: gentoo

    location: /var/lib/portage-overlays/overlay-xfce-dev
    sync-type: git
    sync-uri: git://
    masters: gentoo

    location: /var/lib/portage-overlays/custom
    masters: gentoo
    priority: 25

    location: /var/lib/portage-overlays/xfce-dev2
    masters: gentoo
    priority: 25

    location: /var/lib/portage-overlays/overlay-steam
    sync-type: git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64 ~x86"
CFLAGS="-O2 -pipe -mtune=athlon64 -O2 -pipe"
CONFIG_PROTECT="/etc /etc/revdep-rebuild /etc/stunnel/stunnel.conf /etc/teamspeak3-server/ts3server.ini /etc/teamspeak3-server/ts3server_mariadb.ini /etc/teamspeak3-server/tsdns_settings.ini /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /usr/share/themes/oxygen-gtk/gtk-2.0 /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /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 -mtune=athlon64 -O2 -pipe"
EMERGE_DEFAULT_OPTS="--autounmask=y --autounmask-unrestricted-atoms=y --jobs --load-average 12.0 --quiet-build y --quiet-fail y --quiet-unmerge-warn --alert=y --ask-enter-invalid"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy cgroup clean-logs compressdebug config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles merge-sync metadata-transfer multilib-strict news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en en_GB"
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 --exclude=/.git"
USE="X aalib acl aes amd64 amr amrnb amrwb ao apache2 ares aspell avx bash-completion battery berkdb bs2b bzip2 cli cpufreq crypt curl cxx dbus dga dirac dmx dri dv dvb emerald exif extras flac fma3 fma4 fontconfig fortran freetds ftp gdbm gles1 gles2 glitz gnutls grace hddtemp iconv icu id3tag idn iodbc ipv6 jack java java6 jbig jpeg jpeg2k kdrive kolab kpathsea ladspa lame latex lcms libsamplerate libssh2 libtirpc lm_sensors lua midi mmx mmxext mng mp3 multilib mysql nas ncurses network networkmanager nls nptl nsplugin odbc offensive openmp pam pcre png policykit popcnt postgres profile pulseaudio qt4 qt5 quicktime readline ruby samba sasl schroedinger seccomp server slang sndfile snmp speex sqlite sqlite3 sse sse2 sse3 sse4_1 sse4_2 sse4a ssl ssse3 syslog systemd tcl tcpd theora threads thunar timidity tk truetype udev unicode v4l2 vaapi vdpau vhosts vim-syntax wavpack wifi wmf x264 xattr xcb xinerama xop xprint xscreensaver xvid yv12 zlib" ABI_X86="32 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="actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta cgi dav dav_fs dav_lock dbd deflate dir dumpio env expires ext_filter file_cache filter headers imagemap include info log_config log_forensic logio mime mime_magic negotiation rewrite setenvif speling status substitute unique_id userdir usertrack version vhost_alias access_compat authn_core authz_core cache_disk cgid charset_lite ident lbmethod_bybusyness lbmethod_byrequests lbmethod_bytraffic lbmethod_heartbeat proxy proxy_ajp proxy_balancer proxy_connect proxy_fcgi proxy_ftp proxy_http proxy_scgi ratelimit remoteip reqtimeout slotmem_shm socache_shmcb unixd" APACHE2_MPMS="worker" CALLIGRA_FEATURES="karbon plan sheets stage words" CAMERAS="ptp2 adc65 agfa_cl20 aox ax203 barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a jl2005c kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z topfield toshiba_pdrm11" 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" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev keyboard mouse acecad aiptek calcomp citron digitaledge dmc dynapro elo2300 elographics fpit hyperpen jamstudio joystick libinput magellan microtouch mutouch palmax penmount spaceorb summa synaptics tek4957 ur98 vmmouse wacom" KERNEL="linux" L10N="en-US en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-minimizer nlpsolver scripting-beanshell scripting-javascript wiki-publisher" LIRC_DEVICES="all" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="x86_64 aarch64 alpha arm cris i386 lm32 m68k microblaze microblazeel mips mips64 mips64el mipsel moxie or32 ppc ppc64 ppcemb s390x sh4 sh4eb sparc sparc64 unicore32 xtensa xtensaeb" QEMU_USER_TARGETS="aarch64 alpha arm armeb cris i386 m68k microblaze microblazeel mips mips64 mips64el mipsel mipsn32 mipsn32el or32 ppc ppc64 ppc64abi32 s390x sh4 sh4eb sparc sparc32plus sparc64 unicore32 x86_64" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="nouveau" XFCE_PLUGINS="clock brightness menu logout" 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"

                        Package Settings

app-portage/esearch-9999::gentoo was built with the following:
USE="" ABI_X86="(64)" L10N="-fr -it" PYTHON_TARGETS="python2_7 python3_6 -python3_4 -python3_5"

Comment 2 Zac Medico gentoo-dev 2018-11-03 23:08:13 UTC
When `egencache --update-pkg-desc-index <repo>` is used to generate a cache, the performance of emerge --search should be competitive with esearch. Maybe it's time to retire esearch.
Comment 3 Chris Hall 2020-08-02 08:21:49 UTC
This has just started happening again, as the newly-added dev-haskell/base-prelude-1.3 says:

DESCRIPTION="The most complete prelude formed solely from the \\"
Comment 4 Zac Medico gentoo-dev 2020-08-02 21:55:10 UTC
Planning to remove app-portage/esearch with emerge --search as replacement. See bug 735622.
Comment 5 Zac Medico gentoo-dev 2020-08-16 20:39:43 UTC
*** Bug 737408 has been marked as a duplicate of this bug. ***
Comment 6 Zac Medico gentoo-dev 2020-08-16 20:41:56 UTC
I'll go ahead and fix this, since esearch we still have some users.
Comment 7 Larry the Git Cow gentoo-dev 2020-08-16 20:54:08 UTC
The bug has been closed via the following commit(s):

commit e14213a0eff6711e61225a95807e51ec329196cc
Author:     Zac Medico <>
AuthorDate: 2020-08-16 20:48:31 +0000
Commit:     Zac Medico <>
CommitDate: 2020-08-16 20:54:03 +0000

    app-portage/esearch: 1.3-r3 for bug 670224
     #670224 fix quoting
    Package-Manager: Portage-3.0.2, Repoman-2.3.23
    Signed-off-by: Zac Medico <>

 ...esearch-1.3-r2.ebuild => esearch-1.3-r3.ebuild} |  5 +--
 .../esearch/files/1.3-updatedb-quoting.patch       | 39 ++++++++++++++++++++++
 2 files changed, 42 insertions(+), 2 deletions(-)