The specific offensive fortunes do not show up right with the -o flag. They _are_ installed. I'll elaborate in the additional information. Reproducible: Always Steps to Reproduce: 1.fortune -o limerick 2. 3. Actual Results: No fortunes found Expected Results: a dirty limerick This happens on this amd64 and my old DEC Alpha running Gentoo. If you change directories to /usr/share/fortune/off and execute fortune limerick (with or without -o) it will work. The offensive fortunes are there, but the program doesn't seem to know where to look by default. I could copy the offensive foartunes to /usr/share/fortune, which lets them work, but doesn't keep them segregated. Oh, a simple fortune -o DOES give a random offensive fortune. The problem is specifying the database, e.g. fortune -o limerick. I could attach the emerge --info as a file before. I don't see that option now. I'll work on getting that info to you. Cut/paste is not practical.
Created attachment 402198 [details] emerge --info amd64 Here is the emerge --info from this amd64 machine.
That's not how the code works. If you give it anything after the -o option, the -o option is ignored. It's documented (poorly?) in the man page: "The -o option is ignored if a fortune directory is specified." What it means is that if any non-option argument appears with the -o option, the -o option is ignored. The only way to do what you're trying to do is point at the file directly: fortune /usr/share/fortune/off/limerick
(In reply to Mr. Bones. from comment #2) > That's not how the code works. If you give it anything after the -o option, > the -o option is ignored. It's documented (poorly?) in the man page: > > "The -o option is ignored if a fortune directory is specified." > > What it means is that if any non-option argument appears with the -o option, > the -o option is ignored. > > The only way to do what you're trying to do is point at the file directly: > > fortune /usr/share/fortune/off/limerick Slackware's fortune man page says "...1994 BSD..." and it works as I described. But it doesn't say netbsd like Gentoo... I don't know their source for code. The Gentoo man page says that you can append -o to the end of a simple database name, e.g. fortune limerick-o, and it will strip off the -o and search for the name in the offensive directory. That doesn't work either Maybe that's where you got your idea about the -o being ignored? I don't see what you mean about -o being ignored. The top of the man page says it should be run: fortune [-o] [name] This is obviously low priority, and offensive fortunes can be made to work with extra effort, but something isn't working right.
(In reply to Mr. Bones. from comment #2) > That's not how the code works. If you give it anything after the -o option, > the -o option is ignored. It's documented (poorly?) in the man page: > > "The -o option is ignored if a fortune directory is specified." > > What it means is that if any non-option argument appears with the -o option, > the -o option is ignored. > > The only way to do what you're trying to do is point at the file directly: > > fortune /usr/share/fortune/off/limerick I disagree with your interpretation. The -o is not necessary if you specify the path to a set of offensive fortunes. So, it can be ignored. It does not say you must specify the explicit (heh) path to use a set of offensive fortunes. Your quote says "...directory is specified." I'd say the directory is /usr/share/fortune/off/. My example of fortune -o limerick does not specify a "directory." It doesn't make sense to force users to enter entire pathnames to get offensive fortunes from particular sets. The job of the -o option should be simply to tell the program to look in the offensive directory for sets of fortunes. I'm afraid that your (Mr. Bones) mind may be set already. I hope I'm wrong about that. I doubt the Gentoo forums would get a response. Thanks for the attention, DW
The problem is that the code doesn't match your expectations. What you're trying to do is just not supported by the code. It just doesn't work like how you think it does.
(In reply to Mr. Bones. from comment #5) > The problem is that the code doesn't match your expectations. What you're > trying to do is just not supported by the code. It just doesn't work like > how you think it does. OpenBSD and Slackware's fortune program man page reads the same as Gentoo, more or less. The command line syntax works exactly as I am trying with Gentoo's version. Their programs segregate offensive fortunes by appending "-o" to the filename and not by using a separate directory. Gentoo credits NetBSD as the source of their code. So, I believe Gentoo's code is working as written. I don't know why NetBSD would make the command line work differently because they chose to store the databases differently. I give up. I'll close the bug. Thanks, DW P.S. Debian seems to use the same code as Gentoo. I don't have FreeBSD handy to break the tie as to what's the "typical" method of operation in my universe.
I don't want to call it "invalid," so I'll mark it "wontfix."
Normally I would say this is an upstream bug but there doesn't seem to be an upstream for fortune-mod anymore. Too bad it seems to be unmaintained.