Final round of updates, everything except mirror download should be ready

This commit is contained in:
Andrey Smirnov
2017-04-08 23:59:37 +03:00
parent 2535367c3c
commit 72d233b587
14 changed files with 154 additions and 99 deletions
+2 -2
View File
@@ -123,14 +123,14 @@ func aptlyMirrorUpdate(cmd *commander.Command, args []string) error {
ch := make(chan error, count)
// In separate goroutine (to avoid blocking main), push queue to downloader
go func() {
/*go func() {
for _, task := range queue {
context.Downloader().DownloadWithChecksum(repo.PackageURL(task.RepoURI).String(), task.DestinationPath, ch, task.Checksums, ignoreMismatch, maxTries)
}
// We don't need queue after this point
queue = nil
}()
}()*/
// Wait for all downloads to finish
var errors []string
+8 -1
View File
@@ -5,6 +5,7 @@ import (
"fmt"
"os"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/deb"
"github.com/smira/aptly/query"
"github.com/smira/commander"
@@ -87,11 +88,17 @@ func aptlyPackageShow(cmd *commander.Command, args []string) error {
if withFiles {
fmt.Printf("Files in the pool:\n")
packagePool := context.PackagePool()
for _, f := range p.Files() {
path, err := context.PackagePool().Path(f.Filename, f.Checksums)
path, err := f.GetPoolPath(packagePool)
if err != nil {
return err
}
if pp, ok := packagePool.(aptly.LocalPackagePool); ok {
path = pp.FullPath(path)
}
fmt.Printf(" %s\n", path)
}
fmt.Printf("\n")