From 72f8e4ab619263952c1ef47f7cc9d64e654798eb Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Fri, 29 Aug 2014 00:52:47 +0400 Subject: [PATCH] Check architectures before applying arch change. #99 --- cmd/mirror_edit.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/mirror_edit.go b/cmd/mirror_edit.go index e0e8710f..ff5fbbe3 100644 --- a/cmd/mirror_edit.go +++ b/cmd/mirror_edit.go @@ -37,6 +37,11 @@ func aptlyMirrorEdit(cmd *commander.Command, args []string) error { if context.globalFlags.Lookup("architectures").Value.String() != "" { repo.Architectures = context.ArchitecturesList() + + err = repo.Fetch(context.Downloader(), nil) + if err != nil { + return fmt.Errorf("unable to edit: %s", err) + } } err = context.CollectionFactory().RemoteRepoCollection().Update(repo) @@ -55,7 +60,7 @@ func makeCmdMirrorEdit() *commander.Command { Short: "edit properties of mirorr", Long: ` Command edit allows to change settings of mirror: -filters. +filters, list of architectures. Example: