Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
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...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-03 22:46 UTC by Martin DiViaio
Modified: 2019-05-08 15:08 UTC (History)
0 users

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 Martin DiViaio 2018-11-03 22:46:44 UTC
eupdatedb is generating python code in /var/cache/edb/esearchdb.py. When an ebuild description contains a backslash like:

DESCRIPTION="Reading, writing and manipulating \\"

The resulting code in /var/cache/edb/esearchdb.py 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>
    main()
  File "/usr/lib64/python3.6/site-packages/esearch/search.py", line 529, in main
    db = loaddb(config)
  File "/usr/lib64/python3.6/site-packages/esearch/search.py", line 172, in loaddb
    from esearchdb import db
  File "/var/cache/edb/esearchdb.py", line 5077
    ('tar', 'dev-haskell/tar', False, '0.5.1.0', '0.5.1.0', '38 kB', 'http://hackage.haskell.org/package/tar', '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/esearchdb.py.


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
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo
    priority: -1000

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

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

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

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

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

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

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

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

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

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

ACCEPT_KEYWORDS="amd64 ~amd64 ~x86"
ACCEPT_LICENSE="* -@EULA MIT"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -mtune=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
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"
DISTDIR="/usr/portage/distfiles"
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"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
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"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en en_GB"
MAKEOPTS="-j5"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        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"


Thanks.
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.