ostbuild: Split nice/logger program out, merge make/makeinstall into one executable
This commit is contained in:
1 parent
6cdea44c4b
commit
ea858ab558
6 files changed
+130
-175
No files matched your search
@@ -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)
|
||||
Reference in new issue
Block a user