mirror of
https://github.com/mudler/luet.git
synced 2025-09-02 07:45:02 +00:00
Add revdep calculation
Add CompilationSpecs type to handle slices of CompilationSpec, to perform operation such as Unique() and Remove(). Add also dependencies and the spec associated to the Artifact, to track how the artifact was generated. Add revdeps compilation wrapper, and unit tests
This commit is contained in:
@@ -25,17 +25,46 @@ import (
|
||||
"sync"
|
||||
|
||||
. "github.com/mudler/luet/pkg/logger"
|
||||
"github.com/mudler/luet/pkg/solver"
|
||||
|
||||
"github.com/mudler/luet/pkg/helpers"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type PackageArtifact struct {
|
||||
Path string
|
||||
Path string
|
||||
Dependencies []Artifact
|
||||
CompileSpec CompilationSpec
|
||||
|
||||
SourceAssertion solver.PackagesAssertions
|
||||
}
|
||||
|
||||
func NewPackageArtifact(path string) Artifact {
|
||||
return &PackageArtifact{Path: path}
|
||||
return &PackageArtifact{Path: path, Dependencies: []Artifact{}}
|
||||
}
|
||||
|
||||
func (a *PackageArtifact) GetSourceAssertion() solver.PackagesAssertions {
|
||||
return a.SourceAssertion
|
||||
}
|
||||
|
||||
func (a *PackageArtifact) SetCompileSpec(as CompilationSpec) {
|
||||
a.CompileSpec = as
|
||||
}
|
||||
|
||||
func (a *PackageArtifact) GetCompileSpec() CompilationSpec {
|
||||
return a.CompileSpec
|
||||
}
|
||||
|
||||
func (a *PackageArtifact) SetSourceAssertion(as solver.PackagesAssertions) {
|
||||
a.SourceAssertion = as
|
||||
}
|
||||
|
||||
func (a *PackageArtifact) GetDependencies() []Artifact {
|
||||
return a.Dependencies
|
||||
}
|
||||
|
||||
func (a *PackageArtifact) SetDependencies(d []Artifact) {
|
||||
a.Dependencies = d
|
||||
}
|
||||
|
||||
func (a *PackageArtifact) GetPath() string {
|
||||
|
Reference in New Issue
Block a user