All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Perale via buildroot <buildroot@buildroot.org>
To: Fiona Klute <fiona.klute@gmx.de>
Cc: Thomas Perale <thomas.perale@mind.be>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 4/6] support/scripts/pkg-stats: fix host/target infra filter
Date: Fri, 15 May 2026 19:46:33 +0200	[thread overview]
Message-ID: <20260515174633.530003-1-thomas.perale@mind.be> (raw)
In-Reply-To: <20260426153334.1026982-5-fiona.klute@gmx.de>

In reply of:
> The filter is supposed to exclude host/target infra from output if the
> respective package is not built with the current
> configuration.
> 
> However, excluding host packages did not work correctly: If keep_host
> is False because the host package is not built, the next branch was
> checked and included the host infra in output with "target" type if
> the target package is built. For a package that support host and
> target build, but gets built only for the target, this leads to output
> like (Meson example):
> 
> meson (target)
> host-meson (target)
> 
> Skip host infra in the target branch instead. Also include
> Package.infra in Package.__str__() result, which was needed for
> debugging this bug.
> 
> Signed-off-by: Fiona Klute <fiona.klute@gmx.de>

Applied to 2025.02.x & 2026.02.x. Thanks

> ---
>  support/scripts/pkg-stats | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
> index a87bb23a8e..bbd1e3e6f0 100755
> --- a/support/scripts/pkg-stats
> +++ b/support/scripts/pkg-stats
> @@ -205,7 +205,7 @@ class Package:
>                  infra = match.group(1)
>                  if infra.startswith("host-") and keep_host:
>                      self.infras.append(("host", infra[5:]))
> -                elif keep_target:
> +                elif not infra.startswith("host-") and keep_target:
>                      self.infras.append(("target", infra))
>  
>      def set_license(self):
> @@ -342,9 +342,10 @@ class Package:
>          return self.path < other.path
>  
>      def __str__(self):
> -        return "%s (path='%s', license='%s', license_files='%s', hash='%s', patches=%d)" % \
> +        return "%s (path='%s', license='%s', license_files='%s', hash='%s', patches=%d, infras=%r)" % \
>              (self.name, self.path, self.is_status_ok('license'),
> -             self.is_status_ok('license-files'), self.status['hash'], self.patch_count)
> +             self.is_status_ok('license-files'), self.status['hash'], self.patch_count,
> +             self.infras)
>  
>  
>  def get_pkglist(trees, npackages, package_list):
> -- 
> 2.53.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2026-05-15 17:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-26 15:33 [Buildroot] [PATCH v2 0/6] Bugfixes for pkg-stats Fiona Klute via buildroot
2026-04-26 15:33 ` [Buildroot] [PATCH v2 1/6] support/scripts/pkg-stats: search only Config.in{, .host} for URL Fiona Klute via buildroot
2026-05-05 19:32   ` Arnout Vandecappelle via buildroot
2026-05-06 17:13     ` Fiona Klute via buildroot
2026-05-15 17:46   ` Thomas Perale via buildroot
2026-04-26 15:33 ` [Buildroot] [PATCH v2 2/6] support/scripts/pkg-stats: format upstream URL info consistently in HTML Fiona Klute via buildroot
2026-05-05 19:44   ` Arnout Vandecappelle via buildroot
2026-05-15 17:46   ` Thomas Perale via buildroot
2026-04-26 15:33 ` [Buildroot] [PATCH v2 3/6] linux/Config.in: add kernel.org URL as BR2_LINUX_KERNEL_LATEST_VERSION help Fiona Klute via buildroot
2026-05-05 19:45   ` Arnout Vandecappelle via buildroot
2026-05-15 17:46   ` Thomas Perale via buildroot
2026-04-26 15:33 ` [Buildroot] [PATCH v2 4/6] support/scripts/pkg-stats: fix host/target infra filter Fiona Klute via buildroot
2026-05-05 19:50   ` Arnout Vandecappelle via buildroot
2026-05-15 17:46   ` Thomas Perale via buildroot [this message]
2026-04-26 15:33 ` [Buildroot] [PATCH v2 5/6] support/scripts/pkg-stats: don't buffer whole file searching for infra Fiona Klute via buildroot
2026-05-05 19:53   ` Arnout Vandecappelle via buildroot
2026-05-15 17:46   ` Thomas Perale via buildroot
2026-04-26 15:33 ` [Buildroot] [PATCH v2 6/6] support/scripts/pkg-stats: run main function only if called as script Fiona Klute via buildroot
2026-05-05 19:53   ` Arnout Vandecappelle via buildroot
2026-05-15 17:46   ` Thomas Perale via buildroot
2026-05-05 19:25 ` [Buildroot] [PATCH v2 0/6] Bugfixes for pkg-stats Arnout Vandecappelle via buildroot
2026-05-06 17:49   ` Fiona Klute via buildroot
2026-05-07  8:34     ` Arnout Vandecappelle via buildroot
2026-05-07 11:55       ` Thomas Petazzoni via buildroot
2026-05-07 13:09         ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260515174633.530003-1-thomas.perale@mind.be \
    --to=buildroot@buildroot.org \
    --cc=fiona.klute@gmx.de \
    --cc=thomas.perale@mind.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.