* [PATCH] dpkg-base: Ignore isar-apt also during apt_unpack
@ 2024-11-07 7:28 'Jan Kiszka' via isar-users
2024-11-13 14:17 ` Uladzimir Bely
0 siblings, 1 reply; 2+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2024-11-07 7:28 UTC (permalink / raw)
To: isar-users
From: Jan Kiszka <jan.kiszka@siemens.com>
Just like apt_fetch, apt_unpack needs to mask out isar-apt so that, when
retrieving the upstream dsc file, it will not stumble over some already
pushed sources in isar-apt for the current package.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/dpkg-base.bbclass | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index e97e4d72..b4ea8e17 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -146,13 +146,19 @@ do_apt_unpack() {
rm -rf ${S}
schroot_create_configs
+ session_id=$(schroot -q -b -c ${SBUILD_CHROOT})
+ echo "Started session: ${session_id}"
+
schroot_cleanup() {
+ schroot -q -f -e -c ${session_id} > /dev/null 2>&1
schroot_delete_configs
}
trap 'exit 1' INT HUP QUIT TERM ALRM USR1
trap 'schroot_cleanup' EXIT
- schroot -d / -c ${SBUILD_CHROOT} -- \
+ schroot -r -c ${session_id} -d / -u root -- \
+ rm /etc/apt/sources.list.d/isar-apt.list /etc/apt/preferences.d/isar-apt
+ schroot -r -c ${session_id} -d / -- \
sh -c '
set -e
for uri in $2; do
@@ -162,6 +168,8 @@ do_apt_unpack() {
dpkg-source -x "${dscfile}" "${PPS}"
done' \
my_script "${BASE_DISTRO}-${BASE_DISTRO_CODENAME}" "${SRC_APT}"
+
+ schroot -e -c ${session_id}
schroot_delete_configs
}
do_apt_unpack[network] = "${TASK_USE_SUDO}"
--
2.43.0
--
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/6f23d1ba-b2b1-4268-b06d-3847baebd8aa%40siemens.com.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dpkg-base: Ignore isar-apt also during apt_unpack
2024-11-07 7:28 [PATCH] dpkg-base: Ignore isar-apt also during apt_unpack 'Jan Kiszka' via isar-users
@ 2024-11-13 14:17 ` Uladzimir Bely
0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2024-11-13 14:17 UTC (permalink / raw)
To: Jan Kiszka, isar-users
On Thu, 2024-11-07 at 08:28 +0100, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Just like apt_fetch, apt_unpack needs to mask out isar-apt so that,
> when
> retrieving the upstream dsc file, it will not stumble over some
> already
> pushed sources in isar-apt for the current package.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> meta/classes/dpkg-base.bbclass | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-
> base.bbclass
> index e97e4d72..b4ea8e17 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -146,13 +146,19 @@ do_apt_unpack() {
> rm -rf ${S}
> schroot_create_configs
>
> + session_id=$(schroot -q -b -c ${SBUILD_CHROOT})
> + echo "Started session: ${session_id}"
> +
> schroot_cleanup() {
> + schroot -q -f -e -c ${session_id} > /dev/null 2>&1
> schroot_delete_configs
> }
> trap 'exit 1' INT HUP QUIT TERM ALRM USR1
> trap 'schroot_cleanup' EXIT
>
> - schroot -d / -c ${SBUILD_CHROOT} -- \
> + schroot -r -c ${session_id} -d / -u root -- \
> + rm /etc/apt/sources.list.d/isar-apt.list
> /etc/apt/preferences.d/isar-apt
> + schroot -r -c ${session_id} -d / -- \
> sh -c '
> set -e
> for uri in $2; do
> @@ -162,6 +168,8 @@ do_apt_unpack() {
> dpkg-source -x "${dscfile}" "${PPS}"
> done' \
> my_script "${BASE_DISTRO}-${BASE_DISTRO_CODENAME}"
> "${SRC_APT}"
> +
> + schroot -e -c ${session_id}
> schroot_delete_configs
> }
> do_apt_unpack[network] = "${TASK_USE_SUDO}"
> --
> 2.43.0
>
Applied to next, thanks.
--
Best regards,
Uladzimir.
--
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/139ee9e5637f7b7fc8597bcf23fbf2dac1734dec.camel%40ilbers.de.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-13 14:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-07 7:28 [PATCH] dpkg-base: Ignore isar-apt also during apt_unpack 'Jan Kiszka' via isar-users
2024-11-13 14:17 ` Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox