solbuild init fails if /var/lib/solbuild/images/$repo-x86_64.img.xz out of date
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 24
- Forks
- 15
- Avg merge
- 13h 27m
- Merged PRs (30d)
- 3
Description
Recently I ran into an issue where running solbuild init failed. This was after the outage.
The error was that it failed to decompress the downloaded file.
The file that was downloaded was a 404 page in html rather than the tarball because the file /var/lib/solbuild/images/unstable-x86_64.img.xz pointed to a resource that was no longer available
The manual workaround was to delete /var/lib/solbuild/images/unstable-x86_64.img.xz and run the command again
Proposed solution: Add logic to solbuild init that if it gets an error trying to uncompress the repo archive, that it offers the user an action to fix (delete the bad tarball).
Logic flow:
When running solbuild init
If an error is encountered when trying to decompress the downloaded repo archive file
Check /var/lib/solbuild/images for a pre-existing file like unstable-x86_64.img.xz
Check if that file is valid. If not:
Offer user to delete that file,
If user chooses no, exit with warning that things may still be bork
If yes, delete that file. Rerun solbuild init, check for success.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the solbuild init command and trace where the repository archive in /var/lib/solbuild/images is downloaded and decompressed. Reproduce the stale or invalid unstable-x86_64.img.xz case, then verify that init detects the failure, offers deletion, respects a negative response, and retries successfully after deletion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system, cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100