public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 1/1] dpkg-runbuild: start with clean apt-cache
@ 2024-01-24  8:30 Felix Moessbauer
  2024-01-29 10:50 ` Uladzimir Bely
  0 siblings, 1 reply; 5+ messages in thread
From: Felix Moessbauer @ 2024-01-24  8:30 UTC (permalink / raw)
  To: isar-users; +Cc: adriaan.schmidt, Felix Moessbauer

The global apt-cache is imported during dpkg-runbuild and cleaned once
the function completes. This works properly on successfull builds.
However, in case of a build failure, the apt-cache dir is not cleaned
and re-read on the next build, leading to unstable builds in case
erronous data was added to the cache.

This patch adds the local apt-cache dir to the cleandirs and by that
cleans it before the function is executed.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes/dpkg.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 3057329f..8800ce41 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -34,6 +34,7 @@ CP_FLAGS ?= "-Ln --no-preserve=owner"
 CP_FLAGS:sid ?= "-L --update=none --no-preserve=owner"
 
 # Build package from sources using build script
+dpkg_runbuild[cleandirs] += "${WORKDIR}/rootfs"
 dpkg_runbuild[vardepsexclude] += "${SBUILD_PASSTHROUGH_ADDITIONS}"
 dpkg_runbuild() {
     E="${@ isar_export_proxies(d)}"
-- 
2.39.2


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

end of thread, other threads:[~2024-02-05  8:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24  8:30 [PATCH 1/1] dpkg-runbuild: start with clean apt-cache Felix Moessbauer
2024-01-29 10:50 ` Uladzimir Bely
2024-02-04 11:10   ` Jan Kiszka
2024-02-05  7:35     ` MOESSBAUER, Felix
2024-02-05  8:56       ` Jan Kiszka

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