mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-09 06:04:12 +00:00
Store package ref list in separate entity and load it only on demand.
This commit is contained in:
+11
-3
@@ -71,6 +71,11 @@ func aptlyMirrorShow(cmd *commander.Command, args []string) {
|
||||
log.Fatalf("Unable to show: %s", err)
|
||||
}
|
||||
|
||||
err = repoCollection.LoadComplete(repo)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to show: %s", err)
|
||||
}
|
||||
|
||||
fmt.Printf("Name: %s\n", repo.Name)
|
||||
fmt.Printf("Archive Root URL: %s\n", repo.ArchiveRoot)
|
||||
fmt.Printf("Distribution: %s\n", repo.Distribution)
|
||||
@@ -80,9 +85,7 @@ func aptlyMirrorShow(cmd *commander.Command, args []string) {
|
||||
fmt.Printf("Last update: never\n")
|
||||
} else {
|
||||
fmt.Printf("Last update: %s\n", repo.LastDownloadDate.Format("2006-01-02 15:04:05 MST"))
|
||||
}
|
||||
if repo.PackageRefs != nil {
|
||||
fmt.Printf("Number of packages: %d\n", repo.PackageRefs.Len())
|
||||
fmt.Printf("Number of packages: %d\n", repo.NumPackages())
|
||||
}
|
||||
|
||||
fmt.Printf("\nInformation from release file:\n")
|
||||
@@ -105,6 +108,11 @@ func aptlyMirrorUpdate(cmd *commander.Command, args []string) {
|
||||
log.Fatalf("Unable to update: %s", err)
|
||||
}
|
||||
|
||||
err = repoCollection.LoadComplete(repo)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to update: %s", err)
|
||||
}
|
||||
|
||||
err = repo.Fetch(context.downloader)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to update: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user