dskvr / opkg

Automatically exported from code.google.com/p/opkg
0 stars 0 forks source link

opkg --help indicates commands accept regular expressions, but they actually accept fnmatch patterns #107

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run `opkg --help`
2. See 
    "find <regexp>           List packages whose name or description matches <regexp>"
3. Try to use regexes
4. Realize we actually have fnmatch/glob patterns instead

What is the expected output? What do you see instead?

I expect something like 
 "find <globp>           List packages whose name or description matches <globp>"
(Or similar. Just don't claim it groks regexes)

I see:
 "find <regexp>           List packages whose name or description matches <regexp>"

Please provide any additional information below.

fnmatch/glob patterns are not regular expressions. They are unable to describe 
all regular laguages. Further, the wikipedia regular expression article refers 
to glob patterns as a seperate and distinct item from regular expressions.

Calling fnmatch/glob patterns "regexp" just makes understanding this tool 
unneededly difficult.

Original issue reported on code.google.com by cpscha...@gmail.com on 3 Oct 2013 at 9:35

GoogleCodeExporter commented 8 years ago
What version of opkg are you using and where is it from? There isn't a "find" 
command in the current mainline version of opkg.

Looking at the "search" command though, the argument is passed to fnmatch so 
this is treated as a shell wildcard rather than as a true regexp. The man page 
and help should definitely be updated to reflect this.

Original comment by paul.betafive on 3 Oct 2013 at 12:32

GoogleCodeExporter commented 8 years ago
This was in the openwrt version of opkg.

'find' was just an example. All references to regexp need to be fixed.

Original comment by c...@codyps.com on 4 Oct 2013 at 3:34

GoogleCodeExporter commented 8 years ago
It's on my todo list :)

I'm not an expert on the manpage source format though so if anyone wants to 
speed up the process by submitting patches that'd be great! This just needs 
'regexp' replacing with 'glob' in the manpage and the help output of opkg-cl.

Original comment by paul.betafive on 4 Oct 2013 at 11:44

GoogleCodeExporter commented 8 years ago
Fixed in master for both the man page and the output of 'opkg --help'. 
Obviously the extra commands like 'opkg find' added by OpenWRT need to be fixed 
by OpenWRT as they aren't yet in the upstream opkg repository.

Original comment by paul.betafive on 20 Dec 2013 at 10:42