Repository navigation
install-phone: say so when the work directory can't be created or written - #681
Conversation
…tten Since derekross#648 the shipped ramdisk is read in a directory of its own in --work before the phone is contacted, so --verify-only now creates the work directory. On a home that can't be written (or with a --work the user can't write) it stopped at mkdir's or mktemp's own error, which with uutils coreutils doesn't even name the path. It now stops with the installer's message, naming the work directory and --work DIR. A full install stops there too, before the phone; the later mkdir and chmod of --work only run after this one has succeeded, so they are left alone. Tested: tests/install-phone-initramfs gains the case (a --work under a directory the user can't write, a --work that exists but can't be written, both with --verify-only, and a full install), which fails with main's tool ("says why it refuses a --work that can't be created"); both install-phone suites pass, the initramfs one under umask 077, 022 and 002; tools/pr-check origin/main; tests/all. A bundle's ./install --unsigned --verify-only in a sandbox with a read-only home now ends with the message. Not tested: on a phone (laptop-side only), or as root (the test skips its case there; root can write a mode 555 directory). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, @only21mil. That is the second of the two small things I noted on #648, and it is done in the one place that matters: both I checked it merged onto today's main: One note for later, nothing to change here: the Merging. |
…tten (derekross#681) Since derekross#648 the shipped ramdisk is read in a directory of its own in --work before the phone is contacted, so --verify-only creates the work directory; on a home that can't be written the run stopped at mkdir's or mktemp's own error, which with uutils coreutils doesn't name the path. It now stops with the installer's message, naming the directory and --work DIR, before the phone. tests/install-phone-initramfs covers a --work that can't be created and one that can't be written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What and why
This follows the maintainer's note on #648:
--verify-onlynow creates the work directory, so on a home that can't be written it stops atmktemprather than with a message of the installer's.Since #648 the shipped ramdisk is read in a directory of its own in
--workbefore the phone is contacted. When--work(by default~/.cache/omamobile-install) can't be created or written, the run stopped at mkdir's or mktemp's own error. I made thatmkdir/mktempline end in adiethat names the work directory and--work DIR. A full install stops at the same line, before the phone. The latermkdir -pandchmod 700of--workonly run after this line has worked (every installable descriptor has a vendor ramdisk), so I left them alone.Before (origin/main e163141) and after (this branch): a bundle laid out as
tools/make-bundlelays it out, itsinstalltaken from each revision, run in a bwrap sandbox with the checkout at /mnt. Only fastboot is faked. The faults come from outside: the home is bound read-only andlocked/is mode 555. My script strips the colour codes and filters the full install's output through the grep shown, nothing else. This laptop has uutils coreutils, whosemkdirdoesn't name the path.Before:
After:
Regression test (a stand-in, not the reproduction):
tests/install-phone-initramfsadds a--workunder a mode 555 directory and a--workthat is one, each with--verify-only, plus a full install with the second. Each must stop with the message and contact no phone. With main's tool it fails at "says why it refuses a --work that can't be created with --verify-only". Guarding onlymkdir, onlymktemp, or dropping the directory from the message each fail it too. Root can write a mode 555 directory, so the case is skipped as root.The body is longer than usual because of the two transcripts.
Device and build
uname -r): not applicableChecks (no phone needed)
tools/pr-check origin/mainpassestests/allpasses (tests/install-phone-initramfsalso under umask 077, 022 and 002)tests/packagespasses (or the packages I touched: ...): not run, no package changedversionbumped, and the new version is in the commit subject: no package changedCo-Authored-By:orAssisted-by:trailer, never aSigned-off-by:On the phone
userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)tools/phone-smokereportNot applicable: a laptop-side installer change that stops before the phone is contacted.
Generated with Claude Opus 5.5 in T3 Code Nightly