Beispiel #1
0
def main():
    """Install packages considered necessary to build software"""
    if is_debian() or is_ubuntu():
        apt_get = APTGet()
        apt_get.install('build-essential')
    else:
        # FIXME: we need to support other distros soon
        pass
Beispiel #2
0
 def test_apt_get_install_no_items_fails(self):
     with patch('genes.process.process.Popen') as mock_popen:
         apt_get = APTGet()
         with self.assertRaises(ValueError):
             apt_get.install()
         mock_popen.assert_not_called()
Beispiel #3
0
 def test_apt_get_install_multiple_items_calls_popen(self):
     with patch('genes.process.process.Popen') as mock_popen:
         apt_get = APTGet()
         apt_get.install('test1', 'test2')
         mock_popen.assert_called_once_with(('apt-get', '-y', 'install', 'test1', 'test2'))
Beispiel #4
0
 def __init__(self):
     if not APTPkg.is_installed("software-properties-common"):
         apt_get = APTGet()
         apt_get.update()
         apt_get.install("software-properties-common")