generateAddonPackages(addonPackageList, excludeFn) {
    let validPackages = this.getValidPackages(addonPackageList);

    let packageMap = Object.create(null);

    validPackages.forEach((pkgInfo) => {
      let addonInfo = new AddonInfo(pkgInfo.name, pkgInfo.realPath, pkgInfo.pkg);
      if (!excludeFn || !excludeFn(addonInfo)) {
        packageMap[pkgInfo.name] = addonInfo;
      }
    });

    return packageMap;
  }
Given a list of PackageInfo objects, generate the 'addonPackages' object (keyed by
name, value = AddonInfo instance, for all packages marked 'valid'). This is stored in
both Addon and Project instances.

@method generateAddonPackages
@param {Array} addonPackageList the list of child addon PackageInfos to work from
@param {Function} excludeFn an optional function. If passed in, each child PackageInfo
will be tested against the function and only included in the package map if the function
returns a truthy value.