List the derivations a package upgrade would build
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
@@ -73,10 +73,14 @@ type UpgradePreview struct {
|
||||
Time string `json:"time"`
|
||||
Download string `json:"download"`
|
||||
Builds int `json:"builds"`
|
||||
BuildNames []string `json:"buildNames"` // what would be built here
|
||||
RebootNeeded bool `json:"rebootNeeded"`
|
||||
Changes []UpgradeChange `json:"changes"`
|
||||
}
|
||||
|
||||
// MoreBuilds is how many derivations are built that BuildNames does not name.
|
||||
func (p UpgradePreview) MoreBuilds() int { return max(p.Builds-len(p.BuildNames), 0) }
|
||||
|
||||
func readUpgradeFile(path string, v any) bool {
|
||||
data, err := os.ReadFile(path)
|
||||
return err == nil && json.Unmarshal(data, v) == nil
|
||||
|
||||
Reference in New Issue
Block a user