search appears to have become case-sensitive again
keszybz opened this issue · 3 comments
https://bodhi.fedoraproject.org/updates/?packages=Systemd → nada
https://bodhi.fedoraproject.org/updates/?packages=systemd → voilà
Resurfacing of #997.
I don't think this was regressed, it always worked this way.
#997 was solved by adding a new case insensitive ?search=
term. The usage of search
or packages
depends on what output user wants:
- https://bodhi.fedoraproject.org/packages/?search=Systemd outputs all packages containing
systemd
(case insensitive) in the name (the endpoint is only JSON) - https://bodhi.fedoraproject.org/updates/?packages=Systemd outputs all updates containing builds of
Systemd
(case sensitive) package - https://bodhi.fedoraproject.org/updates/?search=Systemd outputs all updates containing
systemd
(case insensitive) in builds name. - we also have https://bodhi.fedoraproject.org/updates/?like=Systemd that outputs all updates containing
Systemd
(case sensitive) in builds name.
Note that 3 and 4 include updates from other packages with similar name (e.g. sway-systemd), so they're not equal replacement for a case insensitive package search.
However, package systemd
is not the same as package Systemd
(maybe is just a rename, like KPMcore
and kpmcore
, maybe not). So rather than changing the default behavior, I was thinking we could add a flag to switch from case sensitive to case insensitive - something like updates/?packages=Systemd&case_sensitive=false
.
Other thoughts?
OK, so it sounds like a problem on my side. If this is intentional, then let's just close this issue.
It depends on what you need... Bodhi is indeed currently missing a way to query updates specifying an exact package name, but case insensitive. One may argue that "exact package name" should also be aware of uppercase/lowercase.
If you have a use case where this is needed, we could implement in the way I described before to not broke existing functionality.