-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Idea
The idea is simple. RWS manages metainformation of repositories, so it should be easy to cache it within the service in some convenient form and provide searching functionality.
My scenario
After #10 we can traverse over a repository file tree using a Web browser. I had thought that at this point it would be simple to do search for a package using bash+curl one-liner, because a structure of repositories is known and simple.
I had the need to look, where we have the tarantool-metrics package (and its version). I wrote the following 'one-liner':
$ for u in xenial bionic focal groovy hirsute; do \
for repo in release/1.10 release/2.{0..9} release/modules live/1.10 live/2.{0..9} pre-release/series-2; do \
echo -e "\n====\n$repo (ubuntu $u)\n====\n"; \
curl -Ssf https://rws.tarantool.org/$repo/ubuntu/pool/$u/main/t/tarantool-metrics | \
grep 'a href' | grep -v 'go to the Home Page'; \
done; \
done
But see, how many things are not covered:
- It is only for Ubuntu (but easy to adopt to Debian as well).
- However we need another traverse for CentOS / Fedora / openSUSE packages.
- I borrow Ubuntu versions list from actual tarantool sources, but it misses packages for older Ubuntu versions.
- Hardcoding of repositories, Ubuntu versions.
If I would handle everything, this one-liner will become a way bigger. So my wish to use just bash+curl to perform various searches is a bit more complicated than I would expect for such quite regular task.
I want a reliable solution, which will be built into RWS itself.