protected ServiceOsSpecific populateServicePackagesInfo(ServiceInfo serviceInfo, Map<String, String> hostParams,
                                                        String osFamily) {
    ServiceOsSpecific hostOs = new ServiceOsSpecific(osFamily);
    List<ServiceOsSpecific> foundOSSpecifics = getOSSpecificsByFamily(serviceInfo.getOsSpecifics(), osFamily);
    if (!foundOSSpecifics.isEmpty()) {
      for (ServiceOsSpecific osSpecific : foundOSSpecifics) {
        hostOs.addPackages(osSpecific.getPackages());
      }
      // Choose repo that is relevant for host
      ServiceOsSpecific.Repo serviceRepo = hostOs.getRepo();
      if (serviceRepo != null) {
        String serviceRepoInfo = gson.toJson(serviceRepo);
        hostParams.put(SERVICE_REPO_INFO, serviceRepoInfo);
      }
    }
    return hostOs;
  }
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