| 446 | } |
| 447 | |
| 448 | func (p Port) validate() error { |
| 449 | if p.Package.Url == "" { |
| 450 | return fmt.Errorf("url of %s is empty", p.Name) |
| 451 | } |
| 452 | |
| 453 | if p.Name == "" { |
| 454 | return fmt.Errorf("name of %s is empty", p.Name) |
| 455 | } |
| 456 | |
| 457 | if p.Package.Ref == "" { |
| 458 | return fmt.Errorf("version of %s is empty", p.Name) |
| 459 | } |
| 460 | |
| 461 | for _, config := range p.BuildConfigs { |
| 462 | if err := config.Validate(); err != nil { |
| 463 | return err |
| 464 | } |
| 465 | } |
| 466 | |
| 467 | return nil |
| 468 | } |
| 469 | |
| 470 | func (p Port) matchBuildConfig(config buildsystems.BuildConfig) bool { |
| 471 | // Merge SystemNames and SystemName into a single list. |