* refactor(completion): separate cache validation from update logic
- Add NeedsUpdate() to check if completion cache is stale
- Rename Update() to UpdateCache() and make it unconditional
- Move caching decision to call sites (Show and sync.Run)
- Improve error handling with proper defer for file close
* increase completion coverage
* launch goroutine if update is needed
* remove user dependent test
* Don't rely on transparent decompression in sync list
The current sync list code relies on the HTTP client library transparently
decompressing the packages.gz file. This only works if the server provides
the 'Content-Encoding: gzip" HTTP header, which has apparently changed
recently.
This patch explicitly decompresses the package list if no encoding
information is provided by the server.
Fixes: https://github.com/Jguer/yay/issues/2709
v2: added gzip closer and added error handling
v3: blindly attempt to decompress, since the content encoding is
stripped by the HTTP client when transparently decompressing.
v4: also fix the fetch in command completion using common interface
Signed-off-by: Edwin Peer <espeer@gmail.com>
* fix failing tests, add fallback logging, add gz testcase
* fix lint
---------
Signed-off-by: Edwin Peer <espeer@gmail.com>
* rework relationship between runtime and cfg
* separate runtime from cfg
* simplify instantiation logic
* move installer to appropriate package
* move operator to sync package
* add tests for srcinfo service
* consolidate srcinfo service in sync
* add logger to srcinfo
* add logger to preparer
* remove unused text functions
* remove remaining text.* from srcinfo
* remove global logger parts
* remove global org method exports
* remove global logger
* move text->input
* add rule to prevent fmt.Print
* update golangci go version
* remove outdated FAQs
* remove outdated FAQs