public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH v3 3/3] sbuild: Allow downgrades when installing dependencies
Date: Mon, 31 Oct 2022 07:06:44 +0100	[thread overview]
Message-ID: <20221031060644.20150-4-ubely@ilbers.de> (raw)
In-Reply-To: <20221031060644.20150-1-ubely@ilbers.de>

If the package we are building depends on previously built custom
package, but sbuild chroot happens to have it already installed,
we need to allow downgrades explicitly.

Related commits: 5367ba74d9f2 and 77e62c1e9bbd (for buildchroot).

Actually, the issue is not so typical for sbuild (in comparisong to
previously used buildchroot) while sbuild base chroot keeps the bare
minimum of preinstalled packages.

Anyway, the fix might be needed in case we want to recompile some
essential package and use it as a dependency for another one.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 meta/classes/dpkg.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index c7e7dd34..1f55e3e7 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -92,6 +92,7 @@ dpkg_runbuild() {
         --no-run-lintian --no-run-piuparts --no-run-autopkgtest --resolve-alternatives \
         --no-apt-update \
         --chroot-setup-commands="echo \"Package: *\nPin: release n=${DEBDISTRONAME}\nPin-Priority: 1000\" > /etc/apt/preferences.d/isar-apt" \
+        --chroot-setup-commands="echo \"APT::Get::allow-downgrades 1;\" > /etc/apt/apt.conf.d/50isar-apt" \
         --chroot-setup-commands="rm -f /var/log/dpkg.log" \
         --chroot-setup-commands="cp -n --no-preserve=owner ${ext_deb_dir}/*.deb -t ${deb_dir}/ || :" \
         --finished-build-commands="rm -f ${deb_dir}/sbuild-build-depends-main-dummy_*.deb" \
-- 
2.20.1


  parent reply	other threads:[~2022-10-31  6:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31  6:06 [PATCH v3 0/3] Don't update apt database on every package build Uladzimir Bely
2022-10-31  6:06 ` [PATCH v3 1/3] sbuild: " Uladzimir Bely
2022-10-31  6:06 ` [PATCH v3 2/3] sbuild: Set high prio for the packages from isar-apt repo Uladzimir Bely
2023-01-11 14:36   ` Jan Kiszka
2023-01-11 14:52     ` Jan Kiszka
2023-01-11 17:34       ` Jan Kiszka
2023-01-12  7:46         ` Uladzimir Bely
2022-10-31  6:06 ` Uladzimir Bely [this message]
2022-11-15  7:49 ` [PATCH v3 0/3] Don't update apt database on every package build 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=20221031060644.20150-4-ubely@ilbers.de \
    --to=ubely@ilbers.de \
    --cc=isar-users@googlegroups.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