cygcheck and literal plus sign

Jon Turney jon.turney@dronecode.org.uk
Mon Jan 30 18:30:00 GMT 2017


On 28/01/2017 03:01, Steven Penny wrote:
> On Mon, 27 Jan 2014 16:43:23, Steven Penny wrote:
>>     $ cygcheck -p 'g\x2b\x2b.exe'

I think this relies on this being interpreted as a PCRE regex, which 
hasn't been the case for a while, since some server-side changes.

> It looks like this is broken again. package-grep does work:

Thanks for pointing this out.

> $ q=https://cygwin.com/cgi-bin2/package-grep.cgi
> $ curl -s "$q"'?text=1&arch=x86_64&grep=mingw32-g%2B%2B' | awk 'NR>1{$0=$1}1'
> Found 4 matches for mingw32-g++
> mingw64-i686-gcc-g++-5.4.0-2
> mingw64-i686-gcc-g++-5.4.0-3
> mingw64-x86_64-gcc-g++-5.4.0-2
> mingw64-x86_64-gcc-g++-5.4.0-3
>
> but it seems no incantation will make cygcheck work:
[...]
>
>     $ cygcheck -p mingw32-g++
>     Found 0 matches for mingw32-g

It looks like the underlying bug here is that 'cygcheck -p' doesn't 
encode '+', but the package-grep-cgi script is expecting the query part 
of the URL to be application/x-www-form-urlencoded (as is the case with 
the web form interface to this search), where '+' is the encoding for a 
' '...

I added a workaround to the script so that corresponding decoding ('+' 
-> ' ') is skipped if it looks like a cygcheck request ('text=1'), so 
this should be working again

> $ cygcheck -p mingw32-g++
> Found 4 matches for mingw32-g++
> mingw64-i686-gcc-g++-5.4.0-2 - mingw64-i686-gcc-g++: GCC for Win32 (i686-w64-mingw32) toolchain (C++) (installed binaries and support files)
> mingw64-i686-gcc-g++-5.4.0-3 - mingw64-i686-gcc-g++: GCC for Win32 (i686-w64-mingw32) toolchain (C++) (installed binaries and support files)
> mingw64-x86_64-gcc-g++-5.4.0-2 - mingw64-x86_64-gcc-g++: GCC for Win64 toolchain (C++) (installed binaries and support files)
> mingw64-x86_64-gcc-g++-5.4.0-3 - mingw64-x86_64-gcc-g++: GCC for Win64 toolchain (C++) (installed binaries and support files)


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list