mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-29 04:16:07 +00:00
Prepare archive root when editing it
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ func aptlyMirrorEdit(cmd *commander.Command, args []string) error {
|
|||||||
case "with-udebs":
|
case "with-udebs":
|
||||||
repo.DownloadUdebs = flag.Value.Get().(bool)
|
repo.DownloadUdebs = flag.Value.Get().(bool)
|
||||||
case "archive-url":
|
case "archive-url":
|
||||||
repo.ArchiveRoot = flag.Value.String()
|
repo.SetArchiveRoot(flag.Value.String())
|
||||||
fetchMirror = true
|
fetchMirror = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -112,6 +112,12 @@ func NewRemoteRepo(name string, archiveRoot string, distribution string, compone
|
|||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetArchiveRoot of remote repo
|
||||||
|
func (repo *RemoteRepo) SetArchiveRoot(archiveRoot string) {
|
||||||
|
repo.ArchiveRoot = archiveRoot
|
||||||
|
repo.prepare()
|
||||||
|
}
|
||||||
|
|
||||||
func (repo *RemoteRepo) prepare() error {
|
func (repo *RemoteRepo) prepare() error {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
Downloading ftp://ftp.ru.debian.org/debian/dists/wheezy/Release...
|
Downloading ftp://ftp.ch.debian.org/debian/dists/wheezy/Release...
|
||||||
Mirror [mirror10]: ftp://ftp.ch.debian.org/debian wheezy successfully updated.
|
Mirror [mirror10]: ftp://ftp.ch.debian.org/debian/ wheezy successfully updated.
|
||||||
|
|||||||
Reference in New Issue
Block a user