Exemple #1
0
 def start_interactive_shell(self):
     command = list(self.command)
     command.extend((
         '--shell',
         self.distro,
     ))
     return call(command)
Exemple #2
0
 def update(self):
     command = list(self.command)
     command.extend((
         '--update',
         '--distribution', self.distro,
     ))
     command.extend(self.extra_options)
     return call(command)
Exemple #3
0
 def execute_scripts(self, scripts):
     command = list(self.command)
     for script in scripts:
         command.extend((
             '--execute-script',
             script,
             self.distro,
         ))
     return call(command)
Exemple #4
0
 def update(self):
     command = list(self.command)
     command.extend((
         '--update',
         '--distribution',
         self.distro,
     ))
     command.extend(self.extra_options)
     return call(command)
Exemple #5
0
 def create(self, extra_packages=None):
     command = list(self.command)
     if extra_packages:
         command.append(('--extrapackages', ','.join(extra_packages)))
     command.extend((
         '--create',
         '--distribution',
         self.distro,
     ))
     command.extend(self.extra_options)
     return call(command)
Exemple #6
0
 def execute_script(self, script):
     if os.path.exists(self.basetgz):
         self.update()
     else:
         self.create()
     command = list(self.command)
     command.append('--execute', )
     command.extend(self.extra_options)
     command.extend((
         '--',
         script,
     ))
     return call(command)
Exemple #7
0
 def create(self, extra_packages=None):
     command = list(self.command)
     if extra_packages:
         command.append((
             '--extrapackages',
             ','.join(extra_packages)
         ))
     command.extend((
         '--create',
         '--distribution', self.distro,
     ))
     command.extend(self.extra_options)
     return call(command)
Exemple #8
0
    def execute_script(self, script):
        if os.path.exists(self.basetgz):
            self.update()
        else:
            self.create()
        command = list(self.command)
        command.append(
            '--execute',
        )
        command.extend(self.extra_options)
        command.extend((
            '--',
            script,

        ))
        return call(command)
Exemple #9
0
 def start_interactive_shell(self):
     command = list(self.command)
     command.append('--login')
     command.extend(self.extra_options)
     return call(command)
Exemple #10
0
 def execute_scripts(self, scripts):
     command = list(self.command)
     command = self.add_mock_script(scripts=scripts, command=command)
     command.append(self.distro)
     return call(command)
Exemple #11
0
 def start_interactive_shell(self, script=None):
     command = list(self.command)
     if script:
         command = self.add_mock_script(scripts=[script], command=command)
     command.extend(('--shell', self.distro))
     return call(command)
Exemple #12
0
 def execute_scripts(self, scripts):
     command = list(self.command)
     command = self.add_mock_script(scripts=scripts, command=command)
     command.append(self.distro)
     return call(command)
Exemple #13
0
 def start_interactive_shell(self, script=None):
     command = list(self.command)
     if script:
         command = self.add_mock_script(scripts=[script], command=command)
     command.extend(('--shell', self.distro))
     return call(command)
Exemple #14
0
 def start_interactive_shell(self):
     command = list(self.command)
     command.append('--login')
     command.extend(self.extra_options)
     return call(command)