The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/distrobuilder/pull/300
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Entries in the files section should always be considered if they have no type filter specified. Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
From 9d6c71132cd535f6d0675d8ffdc184c6322d25af Mon Sep 17 00:00:00 2001 From: Thomas Hipp <thomas.h...@canonical.com> Date: Wed, 4 Mar 2020 12:21:35 +0100 Subject: [PATCH] main: Fix file generators Entries in the files section should always be considered if they have no type filter specified. Signed-off-by: Thomas Hipp <thomas.h...@canonical.com> --- distrobuilder/main_lxc.go | 3 ++- distrobuilder/main_lxd.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/distrobuilder/main_lxc.go b/distrobuilder/main_lxc.go index 0384066..b1b29a6 100644 --- a/distrobuilder/main_lxc.go +++ b/distrobuilder/main_lxc.go @@ -122,7 +122,8 @@ func (c *cmdLXC) run(cmd *cobra.Command, args []string, overlayDir string) error return fmt.Errorf("Unknown generator '%s'", file.Generator) } - if !shared.ApplyFilter(&file, c.global.definition.Image.Release, c.global.definition.Image.ArchitectureMapped, c.global.definition.Image.Variant, c.global.definition.Targets.Type, shared.ImageTargetAll|shared.ImageTargetContainer) { + if !shared.ApplyFilter(&file, c.global.definition.Image.Release, c.global.definition.Image.ArchitectureMapped, c.global.definition.Image.Variant, c.global.definition.Targets.Type, 0) && + !shared.ApplyFilter(&file, c.global.definition.Image.Release, c.global.definition.Image.ArchitectureMapped, c.global.definition.Image.Variant, c.global.definition.Targets.Type, shared.ImageTargetAll|shared.ImageTargetContainer) { continue } diff --git a/distrobuilder/main_lxd.go b/distrobuilder/main_lxd.go index 24dc55d..575ac69 100644 --- a/distrobuilder/main_lxd.go +++ b/distrobuilder/main_lxd.go @@ -182,7 +182,8 @@ func (c *cmdLXD) run(cmd *cobra.Command, args []string, overlayDir string) error } for _, file := range c.global.definition.Files { - if !shared.ApplyFilter(&file, c.global.definition.Image.Release, c.global.definition.Image.ArchitectureMapped, c.global.definition.Image.Variant, c.global.definition.Targets.Type, imageTargets) { + if !shared.ApplyFilter(&file, c.global.definition.Image.Release, c.global.definition.Image.ArchitectureMapped, c.global.definition.Image.Variant, c.global.definition.Targets.Type, 0) && + !shared.ApplyFilter(&file, c.global.definition.Image.Release, c.global.definition.Image.ArchitectureMapped, c.global.definition.Image.Variant, c.global.definition.Targets.Type, imageTargets) { continue }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel