mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-19 19:28:22 +00:00
Expose checksum calculation as repository interface.
This commit is contained in:
6
debian/repository.go
vendored
6
debian/repository.go
vendored
@@ -2,6 +2,7 @@ package debian
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/smira/aptly/utils"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -85,3 +86,8 @@ func (r *Repository) LinkFromPool(prefix string, component string, filename stri
|
||||
err = os.Link(sourcePath, filepath.Join(poolPath, baseName))
|
||||
return err
|
||||
}
|
||||
|
||||
// ChecksumsForFile proxies requests to utils.ChecksumsForFile, joining public path
|
||||
func (r *Repository) ChecksumsForFile(path string) (*utils.ChecksumInfo, error) {
|
||||
return utils.ChecksumsForFile(filepath.Join(r.RootPath, "public", path))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user