[lxc-devel] [distrobuilder/master] sources/openwrt: Fix snapshot release
monstermunchkin on Github
lxc-bot at linuxcontainers.org
Tue Mar 31 15:17:35 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200331/fea64df0/attachment.bin>
-------------- next part --------------
From b4ec00e1a8a161828c7c5b583e7fbc984f042057 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Tue, 31 Mar 2020 17:16:47 +0200
Subject: [PATCH] sources/openwrt: Fix snapshot release
Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
sources/openwrt-http.go | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sources/openwrt-http.go b/sources/openwrt-http.go
index cd7d148..4093f50 100644
--- a/sources/openwrt-http.go
+++ b/sources/openwrt-http.go
@@ -58,8 +58,15 @@ func (s *OpenWrtHTTP) Run(definition shared.Definition, rootfsDir string) error
baseURL = fmt.Sprintf("%s/%s/targets/%s/", baseURL, release, architecturePath)
}
- fname := fmt.Sprintf("openwrt-%s%s-generic-rootfs.tar.gz", releaseInFilename,
- strings.Replace(definition.Image.ArchitectureMapped, "_", "-", 1))
+ var fname string
+
+ if release == "snapshot" {
+ fname = fmt.Sprintf("openwrt-%s%s-rootfs.tar.gz", releaseInFilename,
+ strings.Replace(definition.Image.ArchitectureMapped, "_", "-", 1))
+ } else {
+ fname = fmt.Sprintf("openwrt-%s%s-generic-rootfs.tar.gz", releaseInFilename,
+ strings.Replace(definition.Image.ArchitectureMapped, "_", "-", 1))
+ }
url, err := url.Parse(baseURL)
if err != nil {
More information about the lxc-devel
mailing list