FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Java

 
 
LinkBack Thread Tools
 
Old 06-13-2011, 06:23 PM
Will Woods
 
Default refactor: split make_initramfs_runtime out of compress()

No code changes here.
---
src/pylorax/installtree.py | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/pylorax/installtree.py b/src/pylorax/installtree.py
index 8501954..c3bfda4 100644
--- a/src/pylorax/installtree.py
+++ b/src/pylorax/installtree.py
@@ -505,7 +505,6 @@ class LoraxInstallTree(BaseLoraxClass):
shutil.copy2(src, dst)

def compress(self, initrd, kernel, type="xz", args="-9"):
- chdir = lambda: os.chdir(self.root)
start = time.time()

# move corresponding modules to the tree
@@ -513,6 +512,19 @@ class LoraxInstallTree(BaseLoraxClass):
shutil.move(joinpaths(self.workdir, kernel.version),
joinpaths(self.root, "modules"))

+ self.make_initramfs_runtime(initrd, kernel, type, args)
+
+ # move modules out of the tree again
+ logger.debug("moving modules outside initrd")
+ shutil.move(joinpaths(self.root, "modules", kernel.version),
+ self.workdir)
+
+ elapsed = time.time() - start
+
+ return True, elapsed
+
+ def make_initramfs_runtime(self, initrd, kernel, type, args):
+ chdir = lambda: os.chdir(self.root)
find = subprocess.Popen([self.lcmds.FIND, "."], stdout=subprocess.PIPE,
preexec_fn=chdir)

@@ -531,14 +543,6 @@ class LoraxInstallTree(BaseLoraxClass):
logger.debug("compressing")
rc = compressed.wait()

- # move modules out of the tree again
- logger.debug("moving modules outside initrd")
- shutil.move(joinpaths(self.root, "modules", kernel.version),
- self.workdir)
-
- elapsed = time.time() - start
-
- return True, elapsed

@property
def kernels(self):
--
1.7.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 04:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org