summaryrefslogtreecommitdiff
blob: 35141863c0d7af8f92ccb1c5e4822a32081775ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 425aa66d33e1833cfa47b988785def8b42b72f1a Mon Sep 17 00:00:00 2001
From: Markos Chandras <hwoarang@gentoo.org>
Date: Sun, 22 Feb 2015 01:25:36 +0200
Subject: [PATCH] templates/lxc-gentoo.in: Fix stage3 autodetection code

The latest-stage3-$variant.txt files list both the tarball name
and the released date but we only need to pass the stage3 tarball
name to the subsequent wget command otherwise we end up with 404
errors.

Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
---
Different patches have been posted to the mailing lists or github so this is
likely to be fixed upstream really soon
---
 templates/lxc-gentoo.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/templates/lxc-gentoo.in b/templates/lxc-gentoo.in
index 5a87866..464c948 100644
--- a/templates/lxc-gentoo.in
+++ b/templates/lxc-gentoo.in
@@ -160,7 +160,8 @@ cache_stage3()
         printf "Determining path to latest Gentoo %s (%s) stage3 archive...\n" "${arch}" "${variant}"
         printf " => downloading and processing %s\n" "${stage3_pointer}"
 
-        local stage3_latest_tarball=$(wget -q -O - "${stage3_pointer}" | tail -n1 ) \
+        local stage3_latest_tarball=$(wget -q -O - "${stage3_pointer}" | \
+			tail -n1 | cut -d " " -f 1) \
             || die 6 "Error: unable to fetch\n"
 
         printf " => Got: %s\n" "${stage3_latest_tarball}"
-- 
2.3.0