Mikhail Korobov  committed a87d651

aptitude_install command is simplified

  • Participants
  • Parent commits 24a0c75

Comments (0)

Files changed (3)

File fab_deploy/

 def make_clone():
     """ Creates repository clone on remote server. """
     with cd('src'):

File fab_deploy/

 def nginx_install():
     """ Installs nginx. """
-    aptitude_install('nginx', 'lenny-backports')
+    aptitude_install('nginx', '-t lenny-backports')
     run('rm -f /etc/nginx/sites-enabled/default')

File fab_deploy/

-    aptitude_install('bzr', options='--without-recommends')
+    aptitude_install('bzr', '--without-recommends')
     aptitude_install(" ".join(to_install))
     # git and mercurial are outdated in stable Debian Lenny and don't work with
     # some source repositories on github and bitbucket
-    aptitude_install('mercurial git-core', 'lenny-backports')
+    aptitude_install('mercurial git-core', '-t lenny-backports')
     run('easy_install -U pip')
     run('pip install -U virtualenv')
-def aptitude_install(packages, repo=None, update=False, options=''):
+def aptitude_install(packages, options=''):
     """ Installs package via aptitude. """
-    if update:
-        with settings(warn_only=True):
-            run('aptitude update')
-    repo_arg = ('-t ' + repo) if repo else ''
-    run('aptitude install %s %s -y %s' % (options, repo_arg, packages,))
+    run('aptitude install %s -y %s' % (options, packages,))