Commit 6894146
Normalize a Bare CR Too, Through One Helper Both Digests Share
`payload_digest` reduced CRLF and left a bare CR alone, while the installer
reads a snippet in text mode, where a bare CR arrives as a newline and
installs as one. A snippet carrying CR-only endings therefore installed
normalized content and hashed to something else, and the machine was
reported STALE against its own content.
Four sites were doing this replacement by hand and two of them disagreed,
which is the arrangement that produced the defect. They all call one helper
now, so the two digests cannot normalize differently.
Two cases added. The first builds the CR-only variant from the normalized
form rather than by replacing newlines in the file, because these snippets
are CRLF in this repository and a blind replace produces a doubled CR
rather than a bare one. My first version of that test made exactly that
mistake and failed against the fixed code.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 23e80ac commit 6894146
2 files changed
Lines changed: 40 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
139 | 152 | | |
140 | 153 | | |
141 | 154 | | |
| |||
150 | 163 | | |
151 | 164 | | |
152 | 165 | | |
153 | | - | |
| 166 | + | |
154 | 167 | | |
155 | 168 | | |
156 | 169 | | |
| |||
213 | 226 | | |
214 | 227 | | |
215 | 228 | | |
216 | | - | |
217 | | - | |
| 229 | + | |
| 230 | + | |
218 | 231 | | |
219 | 232 | | |
220 | 233 | | |
| |||
536 | 549 | | |
537 | 550 | | |
538 | 551 | | |
539 | | - | |
| 552 | + | |
540 | 553 | | |
541 | 554 | | |
542 | 555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
415 | 438 | | |
416 | 439 | | |
417 | 440 | | |
| |||
0 commit comments