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

Bug 608582

Summary: =app-text/tesseract-3.04.01-r2 misuse of locales
Product: Portage Development Reporter: Oleh <moonlapse81>
Component: UnclassifiedAssignee: Bernard Cafarelli <voyageur>
Status: UNCONFIRMED ---    
Severity: normal CC: chutzpah
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Fosdem livedvd emerge --info

Description Oleh 2017-02-08 06:54:46 UTC
As in description, this ebuild version when compiled with L10N="*" enables all locales. When, in turn, all locales enabled in /etc/portage/package.use in a following way:
app-text/tessaract l10n_* 
it doesn't enable all locales and always skip locales longer than 2 characters.
masked 4.00 version behaves correctly.


Reproducible: Always

Steps to Reproduce:
1. L10N="*" emerge tesseract
2. echo "l10n_*" >> /etc/portage/package.use
3. emerge tesseract
Actual Results:  
For test case number 1:
[ebuild R ] app-text/tesseract-3.04.01-r1::gentoo USE="jpeg png tiff webp -doc -examples -math -opencl -osd -scrollview -static-libs -training" L10N="ar bg ca cs da de el es fi fr he hi hu id it ja ko lt lv nl no pl pt ro ru sk sl sr sv th tl tr uk vi chr zh-CN zh-TW"


For test case number2
[ebuild R ] app-text/tesseract-3.04.01-r1::gentoo USE="jpeg png tiff webp -doc -examples -math -opencl -osd -scrollview -static-libs -training" L10N="ar bg ca cs da de el es fi fr he hi hu id it ja ko lt lv nl no pl pt ro ru sk sl sr sv th tl tr uk vi -chr* -zh-CN* -zh-TW*"
Comment 1 Marek Szuba gentoo-dev 2017-03-06 10:52:49 UTC
As per documentation, the correct way of setting USE_EXPAND flags in package.use is something along the lines of

app-text/tesseract  L10N: *

which (I have just confirmed this) expand wildcards correctly. Please update your configuration.
Comment 2 Oleh 2017-03-06 15:03:10 UTC
as per documentation of what and where. DO not just close as invalid without telling where to look for documentation. L10N USE_EXPAND trasponding into l10n uses. Having said this, tesseract 4.00 respects this, while 3.04 doesn't
Comment 3 Bernard Cafarelli gentoo-dev 2017-03-28 12:26:31 UTC
I cannot reproduce it here, and I don't think I changed something in the locales use flag handling itself in 4.00.
Maybe you have some USE-flags overrides specific to 3.04.01 versions?

On my system:
/etc/make.conf:L10N="fr en"
/etc/portage/package.use/custom:app-text/tesseract math -opencl osd l10n_* # OK too with L10N: *

# emerge -pv tesseract
[ebuild   R    ] app-text/tesseract-3.05.00::gentoo  USE="jpeg math osd png tiff webp -doc -examples -opencl -scrollview -static-libs -training" L10N="ar* bg* ca* chr* cs* da* de* el* es* fi* fr he* hi* hu* id* it* ja* ko* lt* lv* nl* no* pl* pt* ro* ru* sk* sl* sr* sv* th* tl* tr* uk* vi* zh-CN* zh-TW*" 445 312 KiB

# emerge -pv =tesseract-3.04.01-r1
[ebuild     UD ] app-text/tesseract-3.04.01-r1::gentoo [3.05.00::gentoo] USE="jpeg math osd png tiff webp -doc -examples -opencl -scrollview -static-libs -training" L10N="ar* bg* ca* chr* cs* da* de* el* es* fi* fr he* hi* hu* id* it* ja* ko* lt* lv* nl* no* pl* pt* ro* ru* sk* sl* sr* sv* th* tl* tr* uk* vi* zh-CN* zh-TW*" 445 312 KiB

# emerge -pv =tesseract-3.04.01
[ebuild     UD ] app-text/tesseract-3.04.01::gentoo [3.05.00::gentoo] USE="jpeg math osd png scrollview* tiff webp -doc -examples -opencl -static-libs -training" L10N="ar* bg* ca* chr* cs* da* de* el* es* fi* fr he* hi* hu* id* it* ja* ko* lt* lv* nl* no* pl* pt* ro* ru* sk* sl* sr* sv* th* tl* tr* uk* vi* zh-CN* zh-TW*" 445 312 KiB

Without the package.use line:
[ebuild     UD ] app-text/tesseract-3.04.01-r1::gentoo [3.05.00::gentoo] USE="jpeg math osd png tiff webp -doc -examples -opencl -scrollview -static-libs -training" L10N="fr -ar -bg -ca -chr -cs -da -de -el -es -fi -he -hi -hu -id -it -ja -ko -lt -lv -nl -no -pl -pt -ro -ru -sk -sl -sr -sv -th -tl -tr -uk -vi -zh-CN -zh-TW" 0 KiB
Comment 4 Oleh 2017-03-28 15:08:11 UTC
let me test again :)
Comment 5 Oleh 2017-03-28 15:18:42 UTC
still able to reproduce it:
1. i do not have L10N set anywhere in make.conf

2. L10N="*" emerge tesseract enables all locales:

L10N="*" emerge -av tesseract

 * IMPORTANT: 3 news items need reading for repository 'funtoo-overlay'.
 * IMPORTANT: 3 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


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

Calculating dependencies... done!
[ebuild  N     ] media-libs/leptonica-1.74.1:0/5::gentoo  USE="gif jpeg jpeg2k png tiff webp zlib -static-libs {-test} -utils" ABI_X86="(64) -32 (-x32)" 11,433 KiB
[ebuild  N     ] app-text/tesseract-3.05.00::gentoo  USE="jpeg png tiff webp -doc -examples -math -opencl -osd -scrollview -static-libs -training" L10N="ar bg ca chr cs da de el es fi fr he hi hu id it ja ko lt lv nl no pl pt ro ru sk sl sr sv th tl tr uk vi zh-CN zh-TW" 483,889 KiB

Total: 2 packages (2 new), Size of downloads: 495,321 KiB


3. transposed package.use 
USE="l10n_*" emerge tesseract enables locales, but not all

USE="l10n_*" emerge -av tesseract

 * IMPORTANT: 3 news items need reading for repository 'funtoo-overlay'.
 * IMPORTANT: 3 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


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

Calculating dependencies... done!
[ebuild  N     ] media-libs/leptonica-1.74.1:0/5::gentoo  USE="gif jpeg jpeg2k png tiff webp zlib -static-libs {-test} -utils" ABI_X86="(64) -32 (-x32)" 11,433 KiB
[ebuild  N     ] app-text/tesseract-3.05.00::gentoo  USE="jpeg png tiff webp -doc -examples -math -opencl -osd -scrollview -static-libs -training" L10N="ar bg ca cs da de el es fi fr he hi hu id it ja ko lt lv nl no pl pt ro ru sk sl sr sv th tl tr uk vi -chr -zh-CN -zh-TW" 386,364 KiB

Total: 2 packages (2 new), Size of downloads: 397,797 KiB

4.setting l10n_* in package.use obviously gives the same result.

grep -r l10n /etc/portage
/etc/portage/package.use:app-text/tesseract l10n_*

emerge -av tesseract

 * IMPORTANT: 3 news items need reading for repository 'funtoo-overlay'.
 * IMPORTANT: 3 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


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

Calculating dependencies... done!
[ebuild  N     ] media-libs/leptonica-1.74.1:0/5::gentoo  USE="gif jpeg jpeg2k png tiff webp zlib -static-libs {-test} -utils" ABI_X86="(64) -32 (-x32)" 11,433 KiB
[ebuild  N     ] app-text/tesseract-3.05.00::gentoo  USE="jpeg png tiff webp -doc -examples -math -opencl -osd -scrollview -static-libs -training" L10N="ar bg ca cs da de el es fi fr he hi hu id it ja ko lt lv nl no pl pt ro ru sk sl sr sv th tl tr uk vi -chr -zh-CN -zh-TW" 386,364 KiB

Total: 2 packages (2 new), Size of downloads: 397,797 KiB

/etc/portage/package.use:app-text/tesseract l10n_*

so, i still hitting this mysterious problem.
Comment 6 Bernard Cafarelli gentoo-dev 2017-04-13 12:32:15 UTC
I just tested on the FOSDEM live dvd (to try another system), after removing the LINGUAS/L10N variables from make.conf, 'USE="l10n_*" emerge -av tesseract' enabled all locales correctly in 3.05.00 (/etc/portage/package.use/testflags worked too)

A bit out of ideas here :/ Also 4.00 will not be released soon so you will have the problem for some time
Comment 7 Oleh 2017-04-14 06:13:49 UTC
what portage version is in FOSDEM dvd?
Comment 8 Bernard Cafarelli gentoo-dev 2017-04-14 12:50:06 UTC
Created attachment 470058 [details]
Fosdem livedvd emerge --info

Wow it had been a looong time since I attached some emerge --info!

It is the current stable version 2.3.3

Also, I tested on my (stable) x86 server, I get:
$ emerge -pv "=tesseract-3.05.00"
[ebuild  N    ~] app-text/tesseract-3.05.00::gentoo  USE="jpeg png tiff -doc -examples -math -opencl -osd -scrollview -static-libs -training -webp" L10N="fr -ar -bg -ca -chr -cs -da -de -el -es -fi -he -hi -hu -id -it -ja -ko -lt -lv -nl -no -pl -pt -ro -ru -sk -sl -sr -sv -th -tl -tr -uk -vi -zh-CN -zh-TW" 38 577 KiB

$ USE="l10n_*" emerge -pv "=tesseract-3.05.00"
[ebuild  N    ~] app-text/tesseract-3.05.00::gentoo  USE="jpeg png tiff -doc -examples -math -opencl -osd -scrollview -static-libs -training -webp" L10N="ar bg ca chr cs da de el es fi fr he hi hu id it ja ko lt lv nl no pl pt ro ru sk sl sr sv th tl tr uk vi zh-CN zh-TW" 483 889 KiB