From c8b1f5f5ea6c55800086f4c4263f530afda7dcf5 Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Tue, 23 Nov 2010 14:19:32 +0100 Subject: [PATCH] Create the outputtree kernels holder after copying the kernels --- src/pylorax/outputtree.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pylorax/outputtree.py b/src/pylorax/outputtree.py index 3a8cb879..7683c0b6 100644 --- a/src/pylorax/outputtree.py +++ b/src/pylorax/outputtree.py @@ -28,7 +28,7 @@ import shutil import glob import subprocess -from base import BaseLoraxClass +from base import BaseLoraxClass, DataHolder from sysutils import * @@ -65,6 +65,8 @@ class LoraxOutputTree(BaseLoraxClass): self.efibootdir = efibootdir def get_kernels(self): + self.kernels = [] + for n, kernel in enumerate(self.installtree.kernels): suffix = "" if kernel.type == K_PAE: @@ -88,8 +90,10 @@ class LoraxOutputTree(BaseLoraxClass): shutil.copy2(kernel.fpath, dst) # XXX change the fname and fpath to new values - kernel.fname = kname - kernel.fpath = dst + self.kernels.append(DataHolder(fname=kname, + fpath=dst, + version=kernel.version, + type=kernel.type)) def get_isolinux(self): isolinuxbin = joinpaths(self.installtree.root,