public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>, isar-users@googlegroups.com
Cc: Uladzimir Bely <ubely@ilbers.de>, Baurzhan Ismagulov <ibr@ilbers.de>
Subject: Re: [PATCH v7] dpkg: Restore support for replacing pre-installed packages in sbuild-chroot
Date: Fri, 7 Feb 2025 17:57:57 +0200	[thread overview]
Message-ID: <b9abff4e-8125-4d6a-86ac-b0a03ecf3b8f@ilbers.de> (raw)
In-Reply-To: <0dc61862-8da9-4fa0-a5cd-32b3a2f53262@siemens.com>

29/01/2024 09:59, 'Jan Kiszka' via isar-users wrote:
> On 27.01.24 08:42, Uladzimir Bely wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> During the migration to sbuild, support for using self-built packages in
>> the build environment was lost if those were already part of the
>> sbuild-chroot. This restores it by adding --apt-distupgrade to the
>> sbuild call. But that is not enough because sbuild will only upgrade
>> packages from already configured sources, not those specified via
>> --extra-repository. We therefore have to switch back to configuring
>> isar-apt during sbuild-chroot creation.
>>
>> As rootfs_configure_isar_apt configures the isar repo under
>> /isar-apt, we bind-mount the one in /home/builder/${PN} to that folder.
>> Another difference is that we now need to run apt-get update explicitly,
>> but only for isar-apt.
>>
>> For apt fetching, we neither need nor want isar-apt to be available.
>> Rebuilding self-generated apt packages is generally pointless as the
>> needs are better addressed in the generating recipe itself. Exposing
>> isar-apt to the fetch may furthermore lead to fetching a previously
>> built source package of the same recipe, rather than pulling the
>> external version.
>>
>> And because the sbuild-chroots are now left behind with isar-apt
>> configured, the configuration in imager_run can be removed (credits to
>> Srinuvasan Arjunan).
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> Reviewed-by: Uladzimir Bely <ubely@ilbers.de>
> Thanks for sending - thought I did, but I only prepared locally, never
> triggered the submission.
>
> Jan
>
Hello Jan,

It looks like this change creates one more issue.
Here are simple steps to reproduce:

Prepare test recipe:

$ cat meta-isar/recipes-app/hello/pcre2.bb
inherit dpkg

SRC_URI = "apt://pcre2"

CHANGELOG_V = "<orig-version>+isar"

do_prepare_build() {
         deb_add_changelog
}

Go to kas shell (qemuamd64 bookworm):

$ kas-container shell

Perform those steps:

builder@b5422048da4a:/build$ bitbake -c local_isarapt cowsay
builder@b5422048da4a:/build$ bitbake -c build pcre2
builder@b5422048da4a:/build$ bitbake -c cleansstate sbuild-chroot-target
builder@b5422048da4a:/build$ bitbake -c build cowsay

Result:

| Reading package lists...
| Building dependency tree...
| Reading state information...
| Calculating upgrade...
| The following packages will be upgraded:
|   libpcre2-8-0
| 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
| Need to get 0 B/261 kB of archives.
| After this operation, 0 B of additional disk space will be used.
| Get:1 file:/isar-apt isar/main amd64 libpcre2-8-0 amd64 10.42-1+isar 
[261 kB]
| Err:1 file:/isar-apt isar/main amd64 libpcre2-8-0 amd64 10.42-1+isar
|   File not found - 
/isar-apt/pool/main/p/pcre2/libpcre2-8-0_10.42-1+isar_amd64.deb (2: No 
such file or directory)
| E: Failed to fetch 
file:/isar-apt/pool/main/p/pcre2/libpcre2-8-0_10.42-1%2bisar_amd64.deb 
File not found - 
/isar-apt/pool/main/p/pcre2/libpcre2-8-0_10.42-1+isar_amd64.deb (2: No 
such file or directory)
| E: Unable to fetch some archives, maybe run apt-get update or try with 
--fix-missing?
| E: apt-get dist-upgrade failed

Cowsay do not depend on libpcre2-8-0, but dist-upgrade makes apt to install
updated packages.

The reason is /var/lib/apt/lists in sbuild chroot rootfs has the information
about newer libpcre2-8-0_10.42-1+isar_amd64.deb while it is not exists 
in local
isar-apt copy of cowsay package.
And even calling apt-get update of isar-apt do not help.

And now I have the question about which use case does your commit fix?

I've tried 2 scenarios:
1) Upgraded package needed.

meta-isar/recipes-app/hello/pcre2.bb:

CHANGELOG_V = "<orig-version>+isar"

meta-isar/recipes-app/example-raw/example-raw_0.3.bb:

DEBIAN_BUILD_DEPENDS = "libpcre2-8-0 (= 10.42-1+isar)"
DEPENDS += "pcre2"

2) Downgraded package needed.

meta-isar/recipes-app/hello/pcre2.bb:

CHANGELOG_V = "10.40-1"

meta-isar/recipes-app/example-raw/example-raw_0.3.bb:

DEBIAN_BUILD_DEPENDS = "libpcre2-8-0 (= 10.40-1)"
DEPENDS += "pcre2"

And with your commit reverted both scenarios work ok (example-raw is 
built ok).
Am I missing something?

-- 
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/b9abff4e-8125-4d6a-86ac-b0a03ecf3b8f%40ilbers.de.

  reply	other threads:[~2025-02-07 15:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-27  7:42 Uladzimir Bely
2024-01-29  7:59 ` Jan Kiszka
2025-02-07 15:57   ` Anton Mikanovich [this message]
2025-02-09  9:19     ` 'Jan Kiszka' via isar-users
2025-02-10  7:47       ` Anton Mikanovich
2025-02-10  7:49         ` 'Jan Kiszka' via isar-users
2025-02-10 10:59       ` Anton Mikanovich
2025-02-10 11:13         ` 'Jan Kiszka' via isar-users
2025-02-10 11:34           ` Anton Mikanovich
2025-02-10 11:40             ` 'Jan Kiszka' via isar-users
2025-02-10 12:02           ` 'Jan Kiszka' via isar-users
2025-02-10 16:09             ` Anton Mikanovich
2024-01-29 10:48 ` Uladzimir Bely

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=b9abff4e-8125-4d6a-86ac-b0a03ecf3b8f@ilbers.de \
    --to=amikan@ilbers.de \
    --cc=ibr@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=ubely@ilbers.de \
    /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