NewPackagePool creates new instance of PackagePool which specified root
(root string, supportLegacyPaths bool)
| 32 | |
| 33 | // NewPackagePool creates new instance of PackagePool which specified root |
| 34 | func 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) |
| 47 | func (pool *PackagePool) LegacyPath(filename string, checksums *utils.ChecksumInfo) (string, error) { |
no outgoing calls