internal/download: rename to DownloadAndVerifyAll

This commit is contained in:
Felix Lange 2025-05-15 22:38:28 +02:00
parent 5f4917b7e5
commit f81d9bfdc3
2 changed files with 4 additions and 6 deletions

View file

@ -1170,5 +1170,5 @@ func doPurge(cmdline []string) {
func doSanityCheck() { func doSanityCheck() {
csdb := download.MustLoadChecksums("build/checksums.txt") csdb := download.MustLoadChecksums("build/checksums.txt")
csdb.VerifyAll() csdb.DownloadAndVerifyAll()
} }

View file

@ -127,12 +127,10 @@ func (db *ChecksumDB) Files() iter.Seq[string] {
} }
} }
// VerifyAll downloads all files and checks that they match the checksum given in // DownloadAndVerifyAll downloads all files and checks that they match the checksum given in
// the database. This task can be used to sanity-check new checksums. // the database. This task can be used to sanity-check new checksums.
func (db *ChecksumDB) VerifyAll() { func (db *ChecksumDB) DownloadAndVerifyAll() {
var ( var tmp = os.TempDir()
tmp = os.TempDir()
)
for _, e := range db.hashes { for _, e := range db.hashes {
if e.url == nil { if e.url == nil {
log.Printf("Skipping verification of %s: no URL defined in checksum database", e.file) log.Printf("Skipping verification of %s: no URL defined in checksum database", e.file)