code: func applyPackageSpecOverride(packageSpecs []PackageSpec, overrides []PackageSpecOverride, osDistro string) []PackageSpec {
  	var override *PackageSpecOverride
  	for _, o := range overrides {
  		if o.OSDistro == osDistro {
  			override = &o
  			break
  		}
  	}
  	if override == nil {
  		return packageSpecs
  	}
  
  	// Remove packages in the spec that matches the overrides in
  	// Subtractions.
  	var out []PackageSpec
  	subtractions := make(map[string]bool)
  	for _, spec := range override.Subtractions {
  		subtractions[spec.Name] = true
  	}
  	for _, spec := range packageSpecs {
  		if _, ok := subtractions[spec.Name]; !ok {
  			out = append(out, spec)
  		}
  	}
  
  	// Add packages in the spec that matches the overrides in Additions.
  	return append(out, override.Additions...)
  }
docs: // applyPackageSpecOverride applies the package spec overrides for the given
  // osDistro to the packageSpecs and returns the applied result.