getsolus / getsolus/solbuild

solbuild init fails if /var/lib/solbuild/images/$repo-x86_64.img.xz out of date

Open
#29 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.