public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] dpkg-base: apt-get "update" before "source"
@ 2019-02-11  9:33 Henning Schild
  2019-02-11  9:35 ` Henning Schild
  2019-02-18 22:01 ` Maxim Yu. Osipov
  0 siblings, 2 replies; 11+ messages in thread
From: Henning Schild @ 2019-02-11  9:33 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

From: Henning Schild <henning.schild@siemens.com>

When rebuilding we can run into an inconsistent view where buildchroot
assumes it could download the sources of a modified upstream package.
After a "reprepro ... remove" we always need to "apt-get update" to not
operate on an old version of the metadata.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/dpkg-base.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 175dc80..5425df8 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -31,6 +31,10 @@ do_apt_fetch() {
 	fi
 	dpkg_do_mounts
 	E="${@ bb.utils.export_proxies(d)}"
+	sudo -E chroot ${BUILDCHROOT_DIR} /usr/bin/apt-get update \
+		-o Dir::Etc::sourcelist="sources.list.d/isar-apt.list" \
+		-o Dir::Etc::sourceparts="-" \
+		-o APT::Get::List-Cleanup="0"
 	sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
 		sh -c 'cd ${PP} && apt-get -y source ${SRC_APT}'
 	dpkg_undo_mounts
-- 
2.19.2


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

end of thread, other threads:[~2019-03-05 10:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11  9:33 [PATCH] dpkg-base: apt-get "update" before "source" Henning Schild
2019-02-11  9:35 ` Henning Schild
2019-02-11 10:50   ` chombourger
2019-02-11 12:53   ` Jan Kiszka
2019-02-11 13:33     ` chombourger
2019-02-18 14:16       ` Maxim Yu. Osipov
2019-02-11 18:08     ` Henning Schild
2019-02-26 15:00     ` Henning Schild
2019-02-26 15:03       ` Jan Kiszka
2019-03-05 10:11         ` Henning Schild
2019-02-18 22:01 ` Maxim Yu. Osipov

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