ostree: variable rename: parent -> checksum

There's nothing parent-y about what we're resolving.  It's the checksum
of a ref in a given repository.
This commit is contained in:
Achilleas Koutsou 2023-06-05 22:58:16 +02:00 committed by Ondřej Budai
parent 7553d1bee1
commit 56ea5db9a8

View file

@ -152,13 +152,13 @@ func ResolveRef(location, ref string, consumerCerts bool, subs *rhsm.Subscriptio
if err != nil {
return "", NewResolveRefError(fmt.Sprintf("error reading response from ostree repository %q: %v", u.String(), err))
}
parent := strings.TrimSpace(string(body))
checksum := strings.TrimSpace(string(body))
// Check that this is at least a hex string.
_, err = hex.DecodeString(parent)
_, err = hex.DecodeString(checksum)
if err != nil {
return "", NewResolveRefError("ostree repository %q returned invalid reference", u.String())
}
return parent, nil
return checksum, nil
}
// Resolve the ostree source specification into the necessary ref for the image