diff --git a/pym/cl_fill_builder.py b/pym/cl_fill_builder.py index dac6c0c..ac643a9 100644 --- a/pym/cl_fill_builder.py +++ b/pym/cl_fill_builder.py @@ -124,31 +124,6 @@ class fillVars(object, varsShare): else: return cacheDir - reChroot = re.compile("^(?:_=.*bin/chroot|CHROOT=on)$",re.S) - - def isChroot(self,pid): - """Recursive detect chroot mode""" - if not os.access('/proc/%d/environ'%pid,R_OK): - return False - if filter(self.reChroot.match, - open('/proc/%d/environ'%pid,'r').read().split('\x00')): - return True - else: - ppid = filter(lambda x:x.startswith('PPid:'), - open('/proc/%d/status'%pid,'r').readlines())[0] - ppid = int(ppid.strip().partition('\t')[2]) - if ppid == 0: - return False - else: - return self.isChroot(ppid) - - def get_cl_chroot_status(self): - """Detect chroot mode by mtab content""" - try: - return "on" if self.isChroot(os.getpid()) else "off" - except: - return "off" - def get_cl_builder_iso_action(self): """Need perform templates for builder:iso""" if self.Get('cl_action')=='iso': diff --git a/pym/cl_vars_builder.py b/pym/cl_vars_builder.py index c39ef01..48d3536 100644 --- a/pym/cl_vars_builder.py +++ b/pym/cl_vars_builder.py @@ -65,9 +65,6 @@ class Data: # override the default cache location for calckernel cl_kernel_cache_path = {'mode':'w'} - # is shell in chroot - cl_chroot_status = {} - # need perform templates for builder:iso cl_builder_iso_action = {}