[Pkg-escience-soc2009] [SCM] Tool for creating VM images. branch, master, updated. gsoc-2009-final-2-g002b470
David Wendt (kmeisthax)
dcrkid at yahoo.com
Sat Jan 30 20:00:15 UTC 2010
The following commit has been merged in the master branch:
commit 002b470f91464f388fba6dc605317f803f3b2915
Author: David Wendt (kmeisthax) <dcrkid at yahoo.com>
Date: Sat Jan 30 14:59:49 2010 -0500
Reverted to the original list comprehension, instead redefining glob - er, 'notglob' - in the script to do a proper recursive walk over the directory it's called.
This fixes the bug introduced by my previous bugfix due to the improper ordering of /etc directories, i.e. /etc/vmbuilder/xen would get made before /etc/vmbuilder, causing a build crash.
diff --git a/setup.py b/setup.py
index 0b4d8d7..0ec7f5d 100755
--- a/setup.py
+++ b/setup.py
@@ -5,6 +5,15 @@ import VMBuilder.plugins
import os
import subprocess
+def notglob(name):
+ out = []
+
+ for root, dirs, files in os.walk(name):
+ for filename in files:
+ out.append(os.path.join(root, filename))
+
+ return out
+
if os.path.exists('.bzr'):
try:
o = subprocess.Popen(('bzr','version-info', '--python'), stdout=subprocess.PIPE).stdout
@@ -15,16 +24,6 @@ if os.path.exists('.bzr'):
except Exception, e:
print repr(e)
-vmbuilder_data = []
-
-for p in VMBuilder.plugins.find_plugins():
- for pkg in [p.split('.')[-1]]:
- vmbuilder_data.extend(['/etc/vmbuilder/%s' % (pkg,)])
-
- for root, dirs, files in os.walk('VMBuilder/plugins/%s/templates' % (pkg,)):
- for filename in files:
- vmbuilder_data.append(os.path.join(root, filename))
-
setup(name='VMBuilder',
version='0.11',
description='Uncomplicated VM Builder',
@@ -32,6 +31,6 @@ setup(name='VMBuilder',
author_email='soren at canonical.com',
url='http://launchpad.net/vmbuilder/',
packages=['VMBuilder', 'VMBuilder.plugins'] + VMBuilder.plugins.find_plugins(),
- data_files=vmbuilder_data,
+ data_files=[('/etc/vmbuilder/%s' % (pkg,), notglob('VMBuilder/plugins/%s/templates/*' % (pkg,))) for pkg in [p.split('.')[-1] for p in VMBuilder.plugins.find_plugins()]],
scripts=['vmbuilder'],
)
--
Tool for creating VM images.
More information about the Pkg-escience-soc2009
mailing list