release: ResolveLivePath calls ResolveLiveLink (#272 follow-up)
The two had identical bodies. ResolveLivePath now returns ResolveLiveLink's answer, so there is one reading of the live link. Every caller stays as it was, and nothing changes in behaviour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+6
−10
internal/release/staged.go+6 −10
diff --git a/internal/release/staged.go b/internal/release/staged.go| index 2c9e666b3..8487a0743 100644 |
| --- a/internal/release/staged.go |
| +++ b/internal/release/staged.go |
| @@ -163,17 +163,13 @@ func RetainedStaged(optDir, acct, app, ver string) (*StagedIdentity, *Manifest) |
| return &id, m |
| } |
| -// ResolveLivePath is ResolveLive without the hash: one read of host's live |
| -// link, the file at the end of its chain (linkChain) and the link's version, |
| -// with Digest empty. It is for a start that needs only to exec exactly the |
| -// build it named (the activator's live exec gate, Task 9), where hashing a |
| -// build of up to a hundred megabytes at every wake would buy nothing. |
| +// ResolveLivePath is ResolveLiveLink: one read of host's live link, the file |
| +// at the end of its chain (linkChain) and the link's version, with Digest |
| +// empty. It is for a start that needs only to exec exactly the build it |
| +// named (the activator's live exec gate, Task 9), where hashing a build of |
| +// up to a hundred megabytes at every wake would buy nothing. |
| func ResolveLivePath(optDir, host string) (StagedIdentity, error) { |
| - raw, hops, _, err := linkChain(LiveLink(optDir, host)) |
| - if err != nil { |
| - return StagedIdentity{}, err |
| - } |
| - return StagedIdentity{Version: versionOfTarget(optDir, raw), StagedPath: hops[len(hops)-1]}, nil |
| + return ResolveLiveLink(optDir, host) |
| } |
| // VerifyStaged checks the file at id.StagedPath against id.Digest, the digest |