hwoarang    15/02/23 20:18:38

  Added:                lxc-1.1.0-fix-gentoo-template.patch
  Log:
  Switch default lxcpath to /var/lib/lxc. /etc/lxc was far too strange. Add 
patch to fix gentoo template stage3 detection code
  
  (Portage version: 2.2.17/cvs/Linux x86_64, unsigned Manifest commit)

Revision  Changes    Path
1.1                  app-emulation/lxc/files/lxc-1.1.0-fix-gentoo-template.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/lxc/files/lxc-1.1.0-fix-gentoo-template.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/lxc/files/lxc-1.1.0-fix-gentoo-template.patch?rev=1.1&content-type=text/plain

Index: lxc-1.1.0-fix-gentoo-template.patch
===================================================================
>From 425aa66d33e1833cfa47b988785def8b42b72f1a Mon Sep 17 00:00:00 2001
From: Markos Chandras <[email protected]>
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 <[email protected]>
---
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





Reply via email to