mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-27 13:57:46 +00:00
Expose checksum calculation as repository interface.
This commit is contained in:
Vendored
+6
@@ -2,6 +2,7 @@ package debian
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/smira/aptly/utils"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -85,3 +86,8 @@ func (r *Repository) LinkFromPool(prefix string, component string, filename stri
|
|||||||
err = os.Link(sourcePath, filepath.Join(poolPath, baseName))
|
err = os.Link(sourcePath, filepath.Join(poolPath, baseName))
|
||||||
return err
|
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