コード例 #1
0
ファイル: build.py プロジェクト: jonashaag/aurbuilds
 def __enter__(self):
     assert not self._joined, "cannot join environment twice"
     for directory in ['/dev', '/sys', '/proc']:
         execute_command('mount', '--bind', directory,
                         joinpaths(self.root, directory[1:]))
     execute_command('mount', '--bind', config.GLOBAL_PACMAN_CACHE,
                     joinpaths(self.root, 'var/cache/pacman'))
     self._joined = True
コード例 #2
0
ファイル: build.py プロジェクト: jonashaag/aurbuilds
 def __exit__(self, *exc_info):
     for directory in ['dev', 'sys', 'proc', 'var/cache/pacman']:
         execute_command('umount', joinpaths(self.root, directory))
     self._joined = False
コード例 #3
0
ファイル: build.py プロジェクト: jonashaag/aurbuilds
 def execute(self, *command):
     assert self._joined, "join first"
     execute_command('chroot', self.root, *command)
コード例 #4
0
ファイル: pacman.py プロジェクト: jonashaag/aurbuilds
 def execute(self, *args):
     execute_command(*self._get_command(*args))