…+` characters in the pkgname to be translated correctly
archweb_get_pkgbase currently does not urlencode the pkgname, which leads to issues for split packages like libsigc++-docs which have the character '+' in the pkgname.
for example, the following fails unexpectedly:
$ asp list-repos libsigc++-docs
error: unknown package: libsigc++-docs
the attached patch against falconindy/asp.git master uses the --data-urlencode option of curl to correct this problem. The added -G switch to curl forces a GET request, because --data-urlencode implies a POST request by default.
Steps to reproduce:
$ asp list-repos libsigc++-docs
error: unknown package: libsigc++-docs
…+` characters in the pkgname to be translated correctly
archweb_get_pkgbase currently does not urlencode the pkgname, which leads to issues for split packages like libsigc++-docs which have the character '+' in the pkgname.
for example, the following fails unexpectedly:
the attached patch against falconindy/asp.git master uses the --data-urlencode option of curl to correct this problem. The added -G switch to curl forces a GET request, because --data-urlencode implies a POST request by default.
Steps to reproduce:
$ asp list-repos libsigc++-docs error: unknown package: libsigc++-docs
or directly:
$ curl https://www.archlinux.org/packages/search/json/?q=libsigc++-docs {"num_pages": 1, "results": [], "page": 1, "version": 2, "limit": 250, "valid": true}
I reported this on the arch bug tracker, but was met with limited enthusiasm: https://bugs.archlinux.org/task/58091