code: def _add_new_repo(repo, properties):
      '''
      Add a new repo entry
      '''
      repostr = '# ' if not properties.get('enabled') else ''
      repostr += 'src/gz ' if properties.get('compressed') else 'src '
      if ' ' in repo:
          repostr += '"' + repo + '" '
      else:
          repostr += repo + ' '
      repostr += properties.get('uri')
      repostr = _set_trusted_option_if_needed(repostr, properties.get('trusted'))
      repostr += '\n'
      conffile = os.path.join(OPKG_CONFDIR, repo + '.conf')
  
      with salt.utils.files.fopen(conffile, 'a') as fhandle:
          fhandle.write(salt.utils.stringutils.to_str(repostr)f _add_new_repo(repo, properties):
      '''
      Add a new repo entry
      '''
      repostr = '# ' if not properties.get('enabled') else ''
      repostr += 'src/gz ' if properties.get('compressed') else 'src '
      if ' ' in repo:
          repostr += '"' + repo + '" '
      else:
          repostr += repo + ' '
      repostr += properties.get('uri')
      repostr = _set_trusted_option_if_needed(repostr, properties.get('trusted'))
      repostr += '\n'
      conffile = os.path.join(OPKG_CONFDIR, repo + '.conf')
  
      with salt.utils.files.fopen(conffile, 'a') as fhandle:
          fhandle.write(salt.utils.stringutils.to_str(repostr))
docs: Add a new repo entry