Skip to content

Only clear steamapps before the last steamcmd retry - #223

Open
MrRussLuther wants to merge 2 commits into
joedwards32:mainfrom
MrRussLuther:steamcmd-retry-keep-manifest
Open

MrRussLuther wants to merge 2 commits into
joedwards32:mainfrom
MrRussLuther:steamcmd-retry-keep-manifest

Conversation

@MrRussLuther

@MrRussLuther MrRussLuther commented Oct 18, 2026 •

Copy link
Copy Markdown

Fixes #220.

entry.sh runs rm -rf steamapps before every steamcmd retry, so a single failed first attempt costs a full re-download. On 5.0.0 I had steamcmd self-update, then app_update fail with state is 0x6 while no CS2 update was pending. Attempt 2 wiped the manifest and re-verified 73 GB, failed with 0x202, and attempt 3 wiped again and started from zero. Logs are in the issue.

The wipe is also a trap on its own. 0x202 is update paused, which for steamcmd means not enough disk space. With no manifest, steamcmd seems to budget free space for a full install instead of the delta, so on a volume with less free space than the whole game (mine had about 22 GB) the wipe itself produces the 0x202, and the next wipe throws the install away. sloppy-ninja's log in the issue has the same shape: verify to 99.85%, pause, wipe, download from scratch. What worked for them by hand was retrying with validation and the manifest kept.

So this keeps MAX_ATTEMPTS=3 and the wipe from c225ca3 (#142), but makes each retry escalate instead of wiping first:

  • attempt 1: unchanged
  • attempt 2: validate, manifest kept. Repairs corrupt or half-applied files with a delta download and never deletes anything. Verifying 73 GB took about 2 minutes here, against 12 for the download. The one side effect is that it reverts hand-edited game files like gameinfo.gi, which pre.sh already exists for.
  • attempt 3: clear steamapps, then retry (what attempt 2 does today)

Each failure now also prints df -h for the install dir, so a 0x202 reads as a disk message in the log rather than a mystery code.

Tested the loop on its own with a stub steamcmd.sh that fails N times: attempt 2 passes validate with steamapps intact, attempt 3 removes it, STEAMAPPVALIDATE=1 still validates on attempt 1, and the non-zero exit code still propagates when all three fail. I've been running the plain-retry-then-wipe version on my server through a wrapper since the incident in the issue.

entry.sh removed steamapps before every retry, so one failed attempt
(a steamcmd self-update, a CDN hiccup, a 0x6 with no game update
pending) threw away a valid install and started a full re-download.
Attempt 2 is now a plain retry with the manifest kept; attempt 3 still
wipes steamapps as the fallback for stale manifest data (joedwards32#142).

Fixes joedwards32#220
Attempt 2 now runs app_update with validate and the manifest kept, which
repairs corrupt or half-applied files with a delta download. Attempt 3
still clears steamapps as the last resort. Each failure prints df -h for
the install dir so a 0x202 (update paused, out of disk space) is readable
in the log.
@MrRussLuther

Copy link
Copy Markdown
Author

Heads up that I expanded this slightly after opening it. Rereading the logs in #220, the manifest wipe looks like the thing that turns a pause into a from-scratch download, so attempt 2 now validates with the manifest kept and only attempt 3 wipes. Details and the disk-space reasoning are in the PR description. Happy to drop back to the plain retry if you'd rather keep it minimal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

what a terrible downloading method

1 participant