code: def _parse_reported_packages_from_remove_output(output):
      '''
      Parses the output of "opkg remove" to determine what packages would have been
      removed by an operation run with the --noaction flag.
  
      We are looking for lines like
          Removing <package> (<version>) from <Target>...
      '''
      reported_pkgs = {}
      remove_pattern = re.compile(r'Removing\s(?P<package>.*?)\s\((?P<version>.*?)\)\sfrom\s(?P<target>.*?)...')
      for line in salt.utils.itertools.split(output, '\n'):
          match = remove_pattern.match(line)
          if match:
              reported_pkgs[match.group('package')] = ''
  
      return reported_pkgf _parse_reported_packages_from_remove_output(output):
      '''
      Parses the output of "opkg remove" to determine what packages would have been
      removed by an operation run with the --noaction flag.
  
      We are looking for lines like
          Removing <package> (<version>) from <Target>...
      '''
      reported_pkgs = {}
      remove_pattern = re.compile(r'Removing\s(?P<package>.*?)\s\((?P<version>.*?)\)\sfrom\s(?P<target>.*?)...')
      for line in salt.utils.itertools.split(output, '\n'):
          match = remove_pattern.match(line)
          if match:
              reported_pkgs[match.group('package')] = ''
  
      return reported_pkgs
docs: Parses the output of "opkg remove" to determine what packages would have been
      removed by an operation run with the --noaction flag.
  
      We are looking for lines like
          Removing <package> (<version>) from <Target>...