Skip to content

apps/cdogs: prepare_data.sh cannot run end-to-end from a clean data/ (submodule) #12

Description

@jeffory

Problem

apps/cdogs/prepare_data.sh's JSON-copy step references $SRC_DIR/data/*.json (i.e. src/data/*.json relative to the script), but that directory has never existed in the vendored cdogs-sdl source tree. Confirmed with:

git log --all --diff-filter=A -- 'src/data/*'

which returns nothing in the apps/cdogs submodule history. The script was introduced already broken, in submodule commit e6eb5347 ("start port over to a PicOS native app").

Because the script runs under set -e, it aborts partway through — after the graphics rsync step but before missions, sounds, and dogfights — when the missing-data/ cp commands fail. Run against a tree that already has staged data in it, this is actively destructive: it leaves the SD data payload in a partially-overwritten, inconsistent state rather than failing cleanly up front.

apps/cdogs/data/ is currently git-tracked, which is the only thing keeping the staged asset tree intact — a fresh checkout + run of this script would not reproduce it.

Impact

prepare_data.sh cannot currently be used to regenerate the SD asset payload from a clean checkout. This is a submodule issue (apps/cdogs → cdogs-sdl fork), filed here since the submodule doesn't have its own tracker for this project's purposes.

Suggested direction

Either add the missing src/data/*.json source files to the vendored tree, or update the copy step to point at wherever those JSON definitions actually live now (they may have been renamed/relocated upstream). Whichever fix lands, it should also handle the partial-failure case up front rather than aborting mid-rsync.

Context

Surfaced while implementing Stage 0/1 of the C-Dogs asset-memory redesign (local specs, not tracked in this repo). Submodule commits 2b28ead7..8e1226ce.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions