mirror of
https://github.com/mudler/luet.git
synced 2025-08-31 14:52:02 +00:00
Let the build fail when depending on virtuals
This is currently not a valid use case. Virtuals are empty packages and if the `build.yaml` is completely empty, nothing could depend on them. Let's try to not be too smart and build the package image if a source image is supplied, and fail hardly when we depend on a virtual in build time.
This commit is contained in:
@@ -528,9 +528,9 @@ func (cs *LuetCompiler) compileWithImage(image, buildertaggedImage, packageImage
|
||||
p CompilationSpec, generateArtifact bool) (Artifact, error) {
|
||||
|
||||
// If it is a virtual, check if we have to generate an empty artifact or not.
|
||||
if generateArtifact && p.EmptyPackage() {
|
||||
if generateArtifact && p.EmptyPackage() && !p.HasImageSource() {
|
||||
return cs.genArtifact(p, CompilerBackendOptions{}, CompilerBackendOptions{}, concurrency, keepPermissions)
|
||||
} else if p.EmptyPackage() {
|
||||
} else if p.EmptyPackage() && !p.HasImageSource() {
|
||||
return &PackageArtifact{}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user