Skip to content

sync_upstream: the build_ipa.sh slim patch follows upstream #279's pack block - #20

Closed
JMRBDev wants to merge 1 commit into
LNPANDY:mainfrom
JMRBDev:sync-build-ipa-pack
Closed

JMRBDev wants to merge 1 commit into
LNPANDY:mainfrom
JMRBDev:sync-build-ipa-pack

Conversation

@JMRBDev

@JMRBDev JMRBDev commented Oct 26, 2026

Copy link
Copy Markdown

The daily sync would fail on the first upstream sync after #279 (Make repeated IPA and Mac app builds incremental).

build_ipa.sh used to add the RomFS map on a line of its own, right before the pack message:

MAPS+=("$P/romfs=$ROMFS")
t "pack IPA (already-compressed game files stored, everything else deflated)"

#279 moved that into P=Payload/DmIOS.app; MAPS=("$P/romfs=$ROMFS"), with the AOC / PSO / MSL and app maps following. The slim-package patch anchored on the old two-line pair, so the sync stops with dm/ios/tools/build_ipa.sh: pack anchor missing.

Fix: both shapes are handled.

  • new shape — P=Payload/DmIOS.app stays, and a block follows that sets MAPS=("$P/romfs=$ROMFS") for DM_FULL_ROMFS=1 or MAPS=() for the default slim package. The AOC / PSO / MSL and app maps below are untouched, so MAPS is non-empty by the pack call.
  • old shape — the previous two-line replacement, unchanged.

Checked:

  • patch_build_ipa() on upstream/main and on 09f3778^: both patch, and bash -n passes on both results.
  • the fork's own sync_upstream.py from ce9b30b to the new upstream 40b643b: SYNC OK (Python 3.9 floor, bash -n, archive reader test).
  • a real build from the synced tree, Balatro --platform ios: exit 0, the new incremental pack stage runs (0:00), slim IPA 32.6 MB, app build 0:13.

Inert until the next sync brings #279; until then the old shape keeps working.

…'s pack block

Upstream LNPANDY#279 (incremental packs) moved the RomFS map from its own MAPS+= line
into `P=Payload/DmIOS.app; MAPS=("$P/romfs=$ROMFS")`, so the slim-package patch
anchored on the old two-line pair and stopped matching — the daily sync would fail
with "pack anchor missing" on the first sync after it lands.

Both shapes are handled now: with the new line the patch writes `P=Payload/...`
plus a block that sets MAPS to the RomFS map (DM_FULL_ROMFS=1) or to empty (the
default slim package), and leaves the AOC / PSO / MSL and app maps that follow
untouched; the old two-line shape keeps the MAPS+= form.

Checked on both: upstream/main and 09f3778^ patch, and `bash -n` passes.
@LNPANDY

LNPANDY commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Thank you — you and I hit the same failure from two ends within twenty minutes of each other, and I took the fix in c45d36a (sync: follow upstream folding the RomFS mapping into MAPS=) about 16 minutes before you opened this. Great minds, and it confirms the anchor really was dead.

Both patches are semantically identical, which I checked rather than assumed — the resulting MAPS contents match exactly for DM_FULL_ROMFS set and unset:

RomFS in the package slim
mine MAPS=() then if [ -n "${DM_FULL_ROMFS:-}" ]; then MAPS=("$P/romfs=$ROMFS"); fi, t lines grouped before pack_ipa.py same, RomFS absent
yours P=Payload/DmIOS.app then an if holding MAPS=(…) and the t line together else MAPS=() branch

Same maps, same log lines, same bash -n. The difference is only which line the t call sits next to.

Why I kept mine: it had already run. The daily sync failed on this anchor, so I patched it and then drove the full sync through it — 467 upstream commits, all 9 carriers applied with no anchor miss, bash -n clean, the mappings verified one by one (aoc, pso, msl, the app itself — losing any of those yields an IPA that installs and cannot find its resources), and a second pass a no-op. That is in the tree now, which is also why this PR reports as conflicting.

One detail from your write-up I had wrong and am correcting: I attributed the change to the pso/ mapping, but it was upstream #279 (incremental IPA/Mac app packs) that folded the map into the P=…; MAPS=(…) line. Your note is right and it matters — it tells the next person which upstream PR to read.

Also, since you are clearly reading the sync patchers closely: check_patcher_consistency had been reporting drift on this file for a while. After c45d36a and today's sync it passes — "9 patchers agree with the tree" — so the class of failure you caught here is now caught by the sync itself before it opens an issue. If you see another anchor die, that check failing in the workflow log is where it will show.

Closing as fixed-in-tree with thanks. And given you found this from the outside, one request: the dependency-panel and SDK clone fixes in this fork's Windows front end are unverified on real hardware — if you ever point that app at a game, I would rather hear the report than not.

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.

2 participants