cdist fix.
authorCarl Hetherington <cth@carlh.net>
Mon, 4 Aug 2014 13:24:18 +0000 (14:24 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 4 Aug 2014 13:24:18 +0000 (14:24 +0100)
cscript

diff --git a/cscript b/cscript
index 12b4fde700a0a21c9c1f3728ca18b38870a1006c..13382b2668ce48efbb4205611102aed95f941d0f 100644 (file)
--- a/cscript
+++ b/cscript
@@ -223,8 +223,8 @@ def package_centos(target, cpu, version):
     os.makedirs('%s/rpmbuild/SPECS' % target.directory)
     os.makedirs('%s/rpmbuild/SRPMS' % target.directory)
 
-    f = open('%s/.rpmmacros' % target.dir_in_chroot, 'w')
-    print >>f,"%%_topdir %srpmbuild" % target.dir_in_chroot
+    f = open(os.path.expanduser('~/.rpmmacros', 'w')
+    print >>f,os.path.expanduser("%%_topdir ~/srpmbuild")
     f.close()
 
     target.command('./waf dist')