code: def install_packages(packages,
                       what_for='for a complete setup to work properly'):
      '''Try to install .deb packages given by list.
      Return True, if packages could be installed or are installed already, or if
      they cannot be installed but the user gives feedback to continue.
      Else return False.
      '''
      res = True
      non_installed_packages = _non_installed(packages)
      packages_str = '  '.join(non_installed_packages)
      if non_installed_packages:
          with quiet():
              dpkg = _has_dpkg()
          hint = '  (You may have to install them manually)'
          do_install = False
          go_on = True
          if dpkg:
              if _is_sudoer('Want to install dpkg packages'):
                  do_install = True
              else:
                  do_install is False
                  info = yellow(' '.join([
                      'This deb packages are missing to be installed',
                      flo("{what_for}: "), ', '.join(non_installed_packages),
                  ]))
                  question = '  Continue anyway?'
                  go_on = query_yes_no(info + hint + question, default='no')
          else:
              do_install = False
              info = yellow(' '.join([
                  flo('Required {what_for}: '),
                  ', '.join(non_installed_packages),
              ]))
              go_on = query_yes_no(info + hint + '  Continue?', default='yes')
          if not go_on:
              sys.exit('Abort')
          if do_install:
              command = flo('sudo  apt-get install {packages_str}')
              res = run(command).return_code == 0
      return res