mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-05 05:20:34 +00:00
Persisting meta information about release.
This commit is contained in:
@@ -21,6 +21,8 @@ func aptlyMirrorList(cmd *commander.Command, args []string) {
|
||||
repoCollection.ForEach(func(repo *debian.RemoteRepo) {
|
||||
fmt.Printf(" * %s\n", repo)
|
||||
})
|
||||
|
||||
fmt.Printf("\nTo get more information about repository, run `aptly mirror show <name>`.\n")
|
||||
}
|
||||
|
||||
func aptlyMirrorCreate(cmd *commander.Command, args []string) {
|
||||
@@ -74,6 +76,11 @@ func aptlyMirrorShow(cmd *commander.Command, args []string) {
|
||||
fmt.Printf("Distribution: %s\n", repo.Distribution)
|
||||
fmt.Printf("Components: %s\n", strings.Join(repo.Components, ", "))
|
||||
fmt.Printf("Architectures: %s\n", strings.Join(repo.Architectures, ", "))
|
||||
|
||||
fmt.Printf("\nInformation from release file:\n")
|
||||
for name, value := range repo.Meta {
|
||||
fmt.Printf("%s: %s\n", name, value)
|
||||
}
|
||||
}
|
||||
|
||||
func aptlyMirrorUpdate(cmd *commander.Command, args []string) {
|
||||
@@ -99,6 +106,12 @@ func aptlyMirrorUpdate(cmd *commander.Command, args []string) {
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to update: %s", err)
|
||||
}
|
||||
|
||||
err = repoCollection.Update(repo)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to update: %s", err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func makeCmdMirrorCreate() *commander.Command {
|
||||
|
||||
Vendored
+8
-1
@@ -30,7 +30,9 @@ type RemoteRepo struct {
|
||||
// List of components to fetch, if empty, then fetch all components
|
||||
Components []string
|
||||
// List of architectures to fetch, if empty, then fetch all architectures
|
||||
Architectures []string
|
||||
Architectures []string
|
||||
// Meta-information about repository
|
||||
Meta debc.Paragraph
|
||||
archiveRootURL *url.URL
|
||||
}
|
||||
|
||||
@@ -126,6 +128,11 @@ func (repo *RemoteRepo) Fetch(d utils.Downloader) error {
|
||||
}
|
||||
}
|
||||
|
||||
delete(para, "MD5Sum")
|
||||
delete(para, "SHA1")
|
||||
delete(para, "SHA256")
|
||||
repo.Meta = para
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user