docs: def _get_repo_options(fromrepo=None, packagesite=None):
      '''
      Return a list of tuples to seed the "env" list, which is used to set
      environment variables for any pkg_add commands that are spawned.
  
      If ``fromrepo`` or ``packagesite`` are None, then their corresponding
      config parameter will be looked up with config.get.
  
      If both ``fromrepo`` and ``packagesite`` are None, and neither
      freebsdpkg.PACKAGEROOT nor freebsdpkg.PACKAGESITE are specified, then an
      empty list is returned, and it is assumed that the system defaults (or
      environment variables) will be used.
      '''
      root = fromrepo if fromrepo is not None \
          else __salt__['config.get']('freebsdpkg.PACKAGEROOT', None)
      site = packagesite if packagesite is not None \
          else __salt__['config.get']('freebsdpkg.PACKAGESITE', None)
      ret = {}
      if root is not None:
          ret['PACKAGEROOT'] = root
      if site is not None:
          ret['PACKAGESITE'] = site
      return ret