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

Bug 731704

Summary: app-dicts/myspell-en-20190101-r1 installs only en-US hyphenation patterns when L10N="en" or L10N="en-US en-GB"
Product: Gentoo Linux Reporter: Bernd Feige <Bernd.Feige>
Component: Current packagesAssignee: Gino McCarty <onigino>
Status: RESOLVED FIXED    
Severity: normal CC: proxy-maint
Priority: Normal Keywords: PATCH, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/16938
https://github.com/gentoo/gentoo/pull/21169
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to myspell-en-20190101-r1.ebuild

Description Bernd Feige 2020-07-08 09:10:11 UTC
There is a logical error in the ebuild which will set MYSPELL_HYPH=( "hyph_en_US.dic" ) whenever L10N contains "en" or "en_US" even though the previous step set MYSPELL_HYPH=( "hyph_en_GB.dic" ) if L10N contains "en" or "en_GB". The correct and probably intended logic is to *add* to the MYSPELL_HYPH list in these steps.
I attach a corresponding patch for the ebuild, which fixes the message 'Missing hyphenation info - Please install the hyphenation package for locale "en".' in LibreOffice (current version 6.4.5.2).

Reproducible: Always
Comment 1 Bernd Feige 2020-07-08 09:11:53 UTC
Created attachment 648344 [details, diff]
Patch to myspell-en-20190101-r1.ebuild
Comment 2 Gino McCarty 2020-08-01 20:22:04 UTC
Thanks, I'm building a PR for this now
Comment 3 Larry the Git Cow gentoo-dev 2021-06-10 06:40:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9b82a6e088cb33b76a08aa41afcf2306967b97a

commit e9b82a6e088cb33b76a08aa41afcf2306967b97a
Author:     Marco Scardovi <marco@scardovi.com>
AuthorDate: 2021-06-09 14:04:40 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2021-06-10 06:38:36 +0000

    app-dicts/myspell-en: update logic for en-US
    
    Closes: https://github.com/gentoo/gentoo/pull/16938
    Bug: https://bugs.gentoo.org/731704
    Package-Manager: Portage-3.0.19, Repoman-3.0.3
    Signed-off-by: Marco Scardovi <marco@scardovi.com>
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-dicts/myspell-en/myspell-en-20210601-r1.ebuild | 52 ++++++++++++++++++++++
 1 file changed, 52 insertions(+)
Comment 4 gen2dev 2021-07-05 15:52:19 UTC
Update from 20170101 to the just-stabilized 2021-0601-r1 fails.

$ qlist -Iv myspell-en
app-dicts/myspell-en-20170101
$ emerge --pretend --update myspell-en

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

Calculating dependencies \

!!! Problem resolving dependencies for app-dicts/myspell-en
... done!

!!! The ebuild selected to satisfy "myspell-en" has unmet requirements.
- app-dicts/myspell-en-20210601-r1::gentoo USE="" ABI_X86="(64)" L10N="-en -en-AU -en-CA -en-GB -en-US -en-ZA"

  The following REQUIRED_USE flag constraints are unsatisfied:
    any-of ( l10n_en l10n_en-AU l10n_en-CA l10n_en-GB l10n_en-US l10n_en-ZA )

$ emerge --info
Timestamp of repository gentoo: Mon, 05 Jul 2021 15:00:01 +0000
Head commit of repository gentoo: 205596a0f676638bc1fa3a4f6b552b984c98a5d4
sh bash 5.1_p8
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          3.9.5_p2::gentoo
dev-lang/rust-bin:        1.52.1::gentoo
dev-util/cmake:           3.18.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            10.3.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 

local
    location: /etc/portage/overlay
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -fstack-protector -O2 -ftree-vectorize -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
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"
CXXFLAGS="-march=native -fstack-protector -O2 -ftree-vectorize -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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="-march=native -fstack-protector -O2 -ftree-vectorize -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -fstack-protector -O2 -ftree-vectorize -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/"
LANG="C"
LC_ALL="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="--jobs=6 --max-load=12.0"
PKGDIR="/var/cache/binpkgs"
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 amd64 bzip2 cairo cli crypt dbus dri elogind exif fdk ffmpeg fortran gdbm gtk gtk3 iconv ipv6 jpeg libglvnd libtirpc multilib ncurses nls nptl openmp pam pcre pdf png postscript qt5 readline seccomp smp split-usr ssl truetype udev unicode verify-sig xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="fbdev intel nouveau vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 5 gen2dev 2021-07-05 21:17:51 UTC
(In reply to gen2dev from comment #4)
> Update from 20170101 to the just-stabilized 2021-0601-r1 fails.
> 
> $ qlist -Iv myspell-en
> app-dicts/myspell-en-20170101
> $ emerge --pretend --update myspell-en
> 
> These are the packages that would be merged, in reverse order:
> 
> Calculating dependencies \
> 
> !!! Problem resolving dependencies for app-dicts/myspell-en
> ... done!
> 
> !!! The ebuild selected to satisfy "myspell-en" has unmet requirements.
> - app-dicts/myspell-en-20210601-r1::gentoo USE="" ABI_X86="(64)" L10N="-en
> -en-AU -en-CA -en-GB -en-US -en-ZA"
> 
>   The following REQUIRED_USE flag constraints are unsatisfied:
>     any-of ( l10n_en l10n_en-AU l10n_en-CA l10n_en-GB l10n_en-US l10n_en-ZA )
> 
> $ emerge --info
> Timestamp of repository gentoo: Mon, 05 Jul 2021 15:00:01 +0000
> Head commit of repository gentoo: 205596a0f676638bc1fa3a4f6b552b984c98a5d4
> sh bash 5.1_p8
> ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
> app-shells/bash:          5.1_p8::gentoo
> dev-java/java-config:     2.3.1::gentoo
> ...

I think this is failing because I don't have L10N set at all. Maybe when L10N is unset the ebuild should select all the offered locales instead of failing. It looks like that's what PLOCALE.eclass does and effectively what myspell-en-20170101 did.
Comment 6 S. Gilles 2021-07-12 01:38:28 UTC
I have L10N="en-US en", and with myspell-en-20210601-r1 I don't get hyph_en_US.dic installed. Adding 'MYSPELL_HYPH+=( "hyph_en_US.dic" )' to the 'use l10n_en-US || use l10n_en' block fixes things locally.
Comment 7 Bernd Feige 2021-07-12 08:11:56 UTC
(In reply to S. Gilles from comment #6)
> I have L10N="en-US en", and with myspell-en-20210601-r1 I don't get
> hyph_en_US.dic installed. Adding 'MYSPELL_HYPH+=( "hyph_en_US.dic" )' to the
> 'use l10n_en-US || use l10n_en' block fixes things locally.

Yes, myspell-en-20210601-r1 removed adding "hyph_en_US.dic" completely, but in the original patch and Gino's PR we were just changing the "=" to "+=" just as you write. This leads to both "hyph_en_GB.dic" and "hyph_en_US.dic" being installed if L10N contains either "en" or both "en_GB" and "en_US", as probably intended.

Gino, any chance to fix this?
Comment 8 Larry the Git Cow gentoo-dev 2021-07-12 15:32:20 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3fa6ff9ae03b20dca7f7de707294262f5ed1967

commit e3fa6ff9ae03b20dca7f7de707294262f5ed1967
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2021-07-12 15:31:03 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2021-07-12 15:32:12 +0000

    app-dicts/myspell-en: fix 20210601 to install en_US.dic
    
    Bug: https://bugs.gentoo.org/731704
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 .../{myspell-en-20210601-r1.ebuild => myspell-en-20210601-r2.ebuild}     | 1 +
 1 file changed, 1 insertion(+)