ostbuild: Split nice/logger program out, merge make/makeinstall into one executable

This commit is contained in:
Colin Walters committed 2011-11-27 13:07:33 -05:00
1 parent 6cdea44c4b
commit ea858ab558
6 files changed
+130 -175

No files matched your search

+14 -6
View File
@@ -2,12 +2,20 @@
import os,sys,re,subprocess
chroot_path=sys.argv[1]
i=1
repo=sys.argv[i]
i += 1
chroot_path=sys.argv[i]
i += 1
args=sys.argv[i:]
proc_path=os.path.join(chroot_path, 'proc')
subprocess.check_call(['mount', '-t', 'proc', 'proc', proc_path])
def run_in_chroot(args):
proc_path=os.path.join(chroot_path, 'proc')
subprocess.check_call(['mount', '-t', 'proc', 'proc', proc_path])
subprocess.call(['chroot', chroot_path])
subprocess.check_call(['umount', proc_path])
try:
subprocess.check_call(['chroot', chroot_path])
finally:
subprocess.call(['umount', proc_path])
run_in_chroot(args)