LinkFromPool links package file from pool to dist's pool location
(publishedStorage aptly.PublishedStorage, packagePool aptly.PackagePool, prefix, relPath string, force bool)
| 687 | |
| 688 | // LinkFromPool links package file from pool to dist's pool location |
| 689 | func (p *Package) LinkFromPool(publishedStorage aptly.PublishedStorage, packagePool aptly.PackagePool, |
| 690 | prefix, relPath string, force bool) error { |
| 691 | |
| 692 | for i, f := range p.Files() { |
| 693 | sourcePoolPath, err := f.GetPoolPath(packagePool) |
| 694 | if err != nil { |
| 695 | return err |
| 696 | } |
| 697 | |
| 698 | err = publishedStorage.LinkFromPool(prefix, relPath, f.Filename, packagePool, sourcePoolPath, f.Checksums, force) |
| 699 | if err != nil { |
| 700 | return err |
| 701 | } |
| 702 | |
| 703 | if p.IsSource { |
| 704 | p.Extra()["Directory"] = relPath |
| 705 | } else { |
| 706 | p.Files()[i].downloadPath = relPath |
| 707 | } |
| 708 | } |
| 709 | |
| 710 | return nil |
| 711 | } |
| 712 | |
| 713 | // PoolDirectory returns directory in package pool of published repository for this package files |
| 714 | func (p *Package) PoolDirectory() (string, error) { |
nothing calls this directly
no test coverage detected