MCPcopy Create free account
hub / github.com/aptly-dev/aptly / NewPackagePool

Function NewPackagePool

files/package_pool.go:34–44  ·  view source on GitHub ↗

NewPackagePool creates new instance of PackagePool which specified root

(root string, supportLegacyPaths bool)

Source from the content-addressed store, hash-verified

32
33// NewPackagePool creates new instance of PackagePool which specified root
34func NewPackagePool(root string, supportLegacyPaths bool) *PackagePool {
35 rootPath, err := filepath.Abs(root)
36 if err != nil {
37 panic(err)
38 }
39
40 return &PackagePool{
41 rootPath: rootPath,
42 supportLegacyPaths: supportLegacyPaths,
43 }
44}
45
46// LegacyPath returns path relative to pool's root for pre-1.1 aptly (based on MD5)
47func (pool *PackagePool) LegacyPath(filename string, checksums *utils.ChecksumInfo) (string, error) {

Callers 15

SetUpTestMethod · 0.92
SetUpTestMethod · 0.92
SetUpTestMethod · 0.92
TestVerifyMethod · 0.92
TestLinkFromPoolMethod · 0.92
TestFilepathListMethod · 0.92
TestDownloadListMethod · 0.92
TestVerifyFilesMethod · 0.92
TestLinkFromPoolMethod · 0.92
TestLinkFromPoolMethod · 0.92

Calls

no outgoing calls

Tested by 15

SetUpTestMethod · 0.74
SetUpTestMethod · 0.74
SetUpTestMethod · 0.74
TestVerifyMethod · 0.74
TestLinkFromPoolMethod · 0.74
TestFilepathListMethod · 0.74
TestDownloadListMethod · 0.74
TestVerifyFilesMethod · 0.74
TestLinkFromPoolMethod · 0.74
TestLinkFromPoolMethod · 0.74