private List<ServiceOsSpecific> getOSSpecificsByFamily(Map<String, ServiceOsSpecific> osSpecifics, String osFamily) {
    List<ServiceOsSpecific> foundOSSpecifics = new ArrayList<>();
    for (Entry<String, ServiceOsSpecific> osSpecific : osSpecifics.entrySet()) {
      String[] osFamilyNames = osSpecific.getKey().split("\\s*,\\s*");

      for(String osFamilyName:osFamilyNames) {
        if (this.osFamily.isVersionedOsFamilyExtendedByVersionedFamily(osFamily, osFamilyName)) {
          foundOSSpecifics.add(osSpecific.getValue());
          break;
        }
      }
    }
    return foundOSSpecifics;
  }
Computes os-dependent packages for service/host. Does not take into
account package dependencies for ANY_OS. Instead of this method
you should use getPackagesForServiceHost()
because it takes into account both os-dependent and os-independent lists
of packages for service.
@param hostParams may be modified (appended SERVICE_REPO_INFO)
@return a list of os-dependent packages for host
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java