comparison bin/initpbuilder.py @ 105:b4226070371f

Use cmdexpand in bin/initpbuilder.py
author Bernhard Herzog <bh@intevation.de>
date Tue, 04 Mar 2008 14:18:56 +0000
parents e6cfe3b80956
children bfcb2bbf9a52
comparison
equal deleted inserted replaced
104:c0c93d242438 105:b4226070371f
21 from treepkg.options import create_parser 21 from treepkg.options import create_parser
22 from treepkg.packager import create_package_track, PackagerGroup 22 from treepkg.packager import create_package_track, PackagerGroup
23 from treepkg.readconfig import read_config 23 from treepkg.readconfig import read_config
24 from treepkg.util import ensure_directory, writefile 24 from treepkg.util import ensure_directory, writefile
25 from treepkg.run import call 25 from treepkg.run import call
26 from treepkg.cmdexpand import cmdexpand
26 27
27 28
28 pbuilderrc_template = '''\ 29 pbuilderrc_template = '''\
29 # This file was automatically generated by initpbuilder.py. 30 # This file was automatically generated by initpbuilder.py.
30 # for the possible settings see "man pbuilderrc" 31 # for the possible settings see "man pbuilderrc"
78 writefile(pbuilderrc, pbuilderrc_template % replacements) 79 writefile(pbuilderrc, pbuilderrc_template % replacements)
79 80
80 # turn the extra-pkg directory into a proper deb archive 81 # turn the extra-pkg directory into a proper deb archive
81 print "turning the extra-pkg dir into a debian archive" 82 print "turning the extra-pkg dir into a debian archive"
82 extra_pkgdir = replacements["extra-pkgdir"] 83 extra_pkgdir = replacements["extra-pkgdir"]
83 call(["apt-ftparchive", "packages", "."], 84 call(cmdexpand("apt-ftparchive packages ."),
84 stdout=open(os.path.join(extra_pkgdir, "Packages"), "w"), 85 stdout=open(os.path.join(extra_pkgdir, "Packages"), "w"),
85 cwd=extra_pkgdir) 86 cwd=extra_pkgdir)
86 87
87 # create the base.tgz chroot 88 # create the base.tgz chroot
88 print "running pbuilder create" 89 print "running pbuilder create"
89 call(root_cmd + ["pbuilder", "create", "--configfile", pbuilderrc]) 90 call(cmdexpand("@root_cmd pbuilder create --configfile $pbuilderrc",
91 **locals()))
90 92
91 93
92 def parse_commandline(): 94 def parse_commandline():
93 parser = create_parser() 95 parser = create_parser()
94 parser.set_defaults(distribution="etch") 96 parser.set_defaults(distribution="etch")
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)