First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 103071
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Games <games@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Jordan <xero@xeron.cc>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 103071 depends on: Show dependency tree
Show dependency graph
Bug 103071 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-08-19 11:10 0000
when I set LC_ALL or LANG or what not fortune stops working with commands like
"fortune all"

I used to use something like "fortune 80% off all" but this stopped working once
i set LANG. 

$ fortune all
(fortune output)

$ LANG="en_US.UTF-8" fortune all
No fortunes found

------- Comment #1 From Tom Knight 2005-08-19 12:33:52 0000 -------
When $LC_ALL or $LANG are set fortune looks for files in a subdirectory of the
cookie directory named after the locale. To get around this you can create a
directory /usr/share/fortune/$LC_ALL then from there create a symlink: ln -s ..  all

------- Comment #2 From Jordan 2005-08-19 12:42:23 0000 -------
I just tried that however, it still doesn't work.

I ran "strace fortune all" and accordingly I see it does go into the directory
and follow the symlink I created however it still reports "no fortunes found"

here's some example output:

stat64("/usr/share/fortune/en_US.UTF-8/all/knghtbrd", {st_mode=S_IFREG|0644,
st_size=90917, ...}) = 0
stat64("/usr/share/fortune/en_US.UTF-8/all/knghtbrd", {st_mode=S_IFREG|0644,
st_size=90917, ...}) = 0
open("/usr/share/fortune/en_US.UTF-8/all/knghtbrd", O_RDONLY) = 43
stat64("/usr/share/fortune/en_US.UTF-8/all/knghtbrd.u8", {st_mode=S_IFREG|0644,
st_size=90917, ...}) = 0
access("/usr/share/fortune/en_US.UTF-8/all/knghtbrd.dat", R_OK) = 0
stat64("/usr/share/fortune/en_US.UTF-8/all/knghtbrd.dat", {st_mode=S_IFREG|0644,
st_size=2244, ...}) = 0
stat64("/usr/share/fortune/en_US.UTF-8/all/knghtbrd.dat", {st_mode=S_IFREG|0644,
st_size=2244, ...}) = 0
open("/usr/share/fortune/en_US.UTF-8/all/knghtbrd.dat", O_RDONLY) = 44
stat64("/usr/share/fortune/en_US.UTF-8/all/knghtbrd.dat.u8", 0xbfb5fbf4) = -1
ENOENT (No such file or directory)
close(44)                               = 0
stat64("/usr/share/fortune/en_US.UTF-8/all/knghtbrd.u8", {st_mode=S_IFREG|0644,
st_size=90917, ...}) = 0
stat64("/usr/share/fortune/en_US.UTF-8/all/knghtbrd.u8", {st_mode=S_IFREG|0644,
st_size=90917, ...}) = 0
open("/usr/share/fortune/en_US.UTF-8/all/knghtbrd.u8", O_RDONLY) = 44
stat64("/usr/share/fortune/en_US.UTF-8/all/knghtbrd.u8.u8", 0xbfb5fbf4) = -1
ENOENT (No such file or directory)
access("/usr/share/fortune/en_US.UTF-8/all/knghtbrd.u8.dat", R_OK) = -1 ENOENT
(No such file or directory)
close(44)                               = 0

and here's the end of the output:

stat64("/usr/local/share/fortune", 0xbfb60084) = -1 ENOENT (No such file or
directory)
stat64("/home/xero/all", 0xbfb60084)    = -1 ENOENT (No such file or directory)
write(2, "No fortunes found\n", 18No fortunes found
)     = 18
exit_group(1)                           = ?

------- Comment #3 From SpanKY 2005-08-19 17:28:16 0000 -------
works for me ... on my machine fortune looks in a LANG subdir first and then
falls back to the main shared dir if it wasnt able to find anything

what does this show on your machine:
strings `which fortune` | grep /usr

------- Comment #4 From Tom Knight 2005-08-22 11:20:44 0000 -------
(In reply to comment #2)
> I just tried that however, it still doesn't work.
> 

Sorry, I've just noticed that it was only working because my cwd was
/usr/share/fortune/$LANG.

------- Comment #5 From Jordan 2005-08-22 12:17:49 0000 -------
(In reply to comment #3)
> what does this show on your machine:
> strings `which fortune` | grep /usr

$ strings `which fortune`|grep /usr
/usr/local/share/fortune/off
/usr/share/fortune/off
/usr/local/share/fortune
/usr/share/fortune

------- Comment #6 From Tupone Alfredo 2006-03-11 07:19:11 0000 -------
Fixed in CVS. Thanks for report

First Last Prev Next    No search results available      Search page      Enter new bug