public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'cedric.hombourger@siemens.com' via isar-users" <isar-users@googlegroups.com>
To: "amikan@ilbers.de" <amikan@ilbers.de>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: [PATCH] Fix cache-deb-src functionality for non-amd64 builds
Date: Tue, 22 Jul 2025 05:27:34 +0000	[thread overview]
Message-ID: <df56c2824af6fa857374c4f2631983aae5f9585c.camel@siemens.com> (raw)
In-Reply-To: <20250717105159.1989307-1-amikan@ilbers.de>

On Thu, 2025-07-17 at 13:51 +0300, Anton Mikanovich wrote:
> Commit f0da749f introduced `apt-cache -o Dir=${rootfs} dumpavail`
> method to get info about packages installed in rootfs, instead of
> parsing dpkg.log previuosly used.

previously

> 
> But it does not work in case of foreing architecture used. The list

foreign

> comes empty and no source packages get downloaded.
> 
> Instead, chroot into the rootfs and run this inside. The difference:

Yes but with a significant performance hit (QEMU)
I can recheck our options. This is a reminder that I had earlier
proposed
https://lists.isar-build.org/isar-users/20250515150727.1764989-1-cedric.hombourger@siemens.com/T/#t
(probably does not address this specific issue though)

> 
> Works for the same arch:
>   apt-cache -o Dir=/build/tmp/work/debian-bookworm-amd64/isar-image-
> base-qemuamd64/1.0-r0/rootfs dumpavail | wc -l
>   1190397
> 
> Doesn't work for the foreign arch:
>   apt-cache -o Dir=/build/tmp/work/debian-bookworm-arm64/isar-image-
> base-qemuarm64/1.0-r0/rootfs/ dumpavail | wc -l
>   0
> 
> After the patch:
>   sudo chroot /build/tmp/work/debian-bookworm-arm64/isar-image-base-
> qemuarm64/1.0-r0/rootfs/ apt-cache dumpavail | wc -l
>   1170789
> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  meta/classes/deb-dl-dir.bbclass | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-
> dir.bbclass
> index 3f560da4..1f3876db 100644
> --- a/meta/classes/deb-dl-dir.bbclass
> +++ b/meta/classes/deb-dl-dir.bbclass
> @@ -68,7 +68,9 @@ debsrc_download() {
>      trap "rm -f ${avail} ${wanted}" EXIT
>  
>      # List all packages known to apt
> -    apt-cache -o Dir=${rootfs} dumpavail |
> debsrc_source_version_filter > ${avail}
> +    sudo -E chroot --userspec=$( id -u ):$( id -g ) ${rootfs} \
> +        apt-cache dumpavail \
> +        | debsrc_source_version_filter > ${avail}
>  
>      # Use apt-ftparchive to scan all .deb files found in the
> download directory
>      # and get the <source> <version> pairs that we wish to download
> -- 
> 2.34.1
> 

-- 
Cedric Hombourger
Siemens AG
www.siemens.com

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/df56c2824af6fa857374c4f2631983aae5f9585c.camel%40siemens.com.

  reply	other threads:[~2025-07-22  5:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-17 10:51 Anton Mikanovich
2025-07-22  5:27 ` 'cedric.hombourger@siemens.com' via isar-users [this message]
2025-07-22  6:35   ` 'cedric.hombourger@siemens.com' via isar-users
2025-07-22 11:02     ` 'MOESSBAUER, Felix' via isar-users
2025-07-22 11:44     ` Anton Mikanovich

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=df56c2824af6fa857374c4f2631983aae5f9585c.camel@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=amikan@ilbers.de \
    --cc=cedric.hombourger@siemens.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox