User Feedback :: man ls- Not Busybox?



DSL 3.4.11, gnu-utils.dsl loaded.

When you do "man ls", it returns:
 This is not a BusyBox application.
then it opens up the online netrik man page.

I thought it was an issue with the dsl man script, but it turns out that it is a symlink issue that confuses the man script. /bin/ls is symlinked to "busybox" while every other busybox app is symlinked to "/bin/busybox". The man script expects it to be /bin/busybox (or atleast, the second entry in a array to be busybox).

So, fix the symlink, or change the man script to check if it's a symlink to just "busybox" instead of only "/\/busybox/". I don't know enough perl (natch: or any :P) to offer my own fix.

But, since we are talking about the man script, how hard would it be to add two new flags to it? -o and -b.

-o would force it to check for the app online, even if its in bb, while -b would force to check the bb man page for it.

I'm thinking all it needs is:

Code Sample

# Force online
if ( $app  =~ /^-o$|^--online$/ ) {
    print "Forcing online man check...\n";
    sleep 2;
    $app =  $ARGV[1];
    $grab = $MANUAL . $app . '&section=all';
    system("netrik \"$grab\" 2>/dev/null");
    exit;
}

# Force BB
if ( $app  =~ /^-b$|^--busybox$/ ) {
    print "Forcing BusyBox man check...\n";
    sleep 2;
    $app =  $ARGV[1];
    $grab = 'http://www.busybox.net/downloads/BusyBox.html#item_' . $app;
    system("netrik \"$grab\" 2>/dev/null");
    exit;
}


This would be added after the check for -h/--help and before the actual busybox check.

Oh, and last small man related question, shouldn't there be a backdated copy of the busybox online man page that matches the options available for the v1.2.2 busybox that dsl uses, instead of the 1.10 that is current? Sure the changes arn't that big, but for consistency (and nitpickings :P) sake...


edit: A quick nano on a copy of the man script confirms that the -o and -b code works as expected.

Also, I found a nice Freebsd online man page that can be used by this script (I use OSX which uses freebsd tools that I need to check for), but I'll keep that to myself unless someone wants it (Cause why would dsl need to be able to get freebsd man pages? :P)

edit 2: I also finally got around to figuring out how to change the website used by the man script to the nicer linux.die.net man pages (It redirects http://linux.die.net/man/$app to http://linux.die.net/man/$n/$app depending on which man section the app belongs to, which prevented me from using it before.) Pm if you want it, or ask and I'll add the change (or change if using a flag).

i think gnu-utils's 'ls' is not actually part of busybox.
therefore wouldn't it be right to report that it is not ?

Quote
/bin/ls is symlinked to "busybox" while every other busybox app is symlinked to "/bin/busybox".

The symlink will be changed to accomodate the man script.
So man.he.net is no longer working and we now wish to change again, this time, to linux.die.net/man/1/ ?

Quote (roberts @ May 18 2008,17:25)
The symlink will be changed to accomodate the man script.
So man.he.net is no longer working and we now wish to change again, this time, to linux.die.net/man/1/ ?

No, man.he.net is still working. It is just "not as pretty" as linux.die.net, (imho!). I threw that in my message just incase someone would prefer that instead (Hence the PM part).

If it were changed though, it would be:
"netrik "http://linux.die.net/man/$app" 2>/dev/null"
The linux.die.net server automatically finds which man section it belongs in, silently redirecting you to "http://linux.die.net/man/?/$app".
You can double check by going to
"http://linux.die.net/man/ls" and "http://linux.die.net/man/socket"
which redirect to /1/ls and /3/socket, respectfully.

--
Re: Humpty, gnu-utils.dsl only updates some (most) of the base commands, not all (in this case, ls). The core-utils.uci replaces all of them.


edit:
If you wanted to use linux.die.net instead, the full changes would be:

Code Sample

my $MANUAL='http://linux.die.net/man/';

---snip---

else {
   print "This is not a BusyBox application.\n";
   sleep 1;
   $grab = $MANUAL . $app;
#print $grab . "\n"; exit;

}
if ($app=~/^\w+$/) {
       system("netrik \"$grab\" 2>/dev/null");
}
else {
print $usage;
exit;
}
---eof---

Next Page...
original here.