public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] dpkg: Fix internal deb import for sbuild
@ 2023-09-11  6:36 Uladzimir Bely
  2023-09-19  4:37 ` Uladzimir Bely
  0 siblings, 1 reply; 2+ messages in thread
From: Uladzimir Bely @ 2023-09-11  6:36 UTC (permalink / raw)
  To: isar-users

Directory "/var/cache/apt/archives" may not exist under sbuild env
(for example, when sbuild chroot was taken from sstate-cache), so
deb import doesn't properly work in this case. This makes apt
download packages from external mirror instead of using cached
files.

Also, stop masking (with "|| :" any possible errors while importing
and exporting *.deb files to/from sbuild environment.
---
 meta/classes/dpkg.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index c596adbf..3acdcb31 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -109,9 +109,10 @@ dpkg_runbuild() {
         --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="ln -sf ${ext_deb_dir}/*.deb -t ${deb_dir}/ || :" \
+        --chroot-setup-commands="mkdir -p ${deb_dir}" \
+        --chroot-setup-commands="ln -sf ${ext_deb_dir}/*.deb -t ${deb_dir}/" \
         --finished-build-commands="rm -f ${deb_dir}/sbuild-build-depends-main-dummy_*.deb" \
-        --finished-build-commands="cp -Ln --no-preserve=owner ${deb_dir}/*.deb -t ${ext_deb_dir}/ || :" \
+        --finished-build-commands="cp -Ln --no-preserve=owner ${deb_dir}/*.deb -t ${ext_deb_dir}/" \
         --finished-build-commands="cp /var/log/dpkg.log ${ext_root}/dpkg_partial.log" \
         --debbuildopts="--source-option=-I" \
         --build-dir=${WORKDIR} --dist="isar" ${DSC_FILE}
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] dpkg: Fix internal deb import for sbuild
  2023-09-11  6:36 [PATCH] dpkg: Fix internal deb import for sbuild Uladzimir Bely
@ 2023-09-19  4:37 ` Uladzimir Bely
  0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2023-09-19  4:37 UTC (permalink / raw)
  To: isar-users

On Mon, 2023-09-11 at 08:36 +0200, Uladzimir Bely wrote:
> Directory "/var/cache/apt/archives" may not exist under sbuild env
> (for example, when sbuild chroot was taken from sstate-cache), so
> deb import doesn't properly work in this case. This makes apt
> download packages from external mirror instead of using cached
> files.
> 
> Also, stop masking (with "|| :" any possible errors while importing
> and exporting *.deb files to/from sbuild environment.
> ---
>  meta/classes/dpkg.bbclass | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied to next.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-19  4:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11  6:36 [PATCH] dpkg: Fix internal deb import for sbuild Uladzimir Bely
2023-09-19  4:37 ` Uladzimir Bely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox