code: func (validator *packageValidator) Validate(spec SysSpec) (error, error) {
  	if len(spec.PackageSpecs) == 0 {
  		return nil, nil
  	}
  
  	var err error
  	if validator.kernelRelease, err = getKernelRelease(); err != nil {
  		return nil, err
  	}
  	if validator.osDistro, err = getOSDistro(); err != nil {
  		return nil, err
  	}
  
  	manager, err := newPackageManager()
  	if err != nil {
  		return nil, err
  	}
  	specs := applyPackageSpecOverride(spec.PackageSpecs, spec.PackageSpecOverrides, validator.osDistro)
  	return validator.validate(specs, manager)
  }
docs: // Validate checks packages and their versions against the spec using the
  // package manager on the running machine, and returns an error on any
  // package/version mismatch.