* [PATCH v3 1/1] run clean task of BPN as well when cleaning PN
@ 2025-08-21 9:23 'Felix Moessbauer' via isar-users
2025-08-21 9:24 ` 'Jan Kiszka' via isar-users
0 siblings, 1 reply; 2+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2025-08-21 9:23 UTC (permalink / raw)
To: isar-users
Cc: adriaan.schmidt, amikan, cedric.hombourger, florian.bezdeka,
stefan-koch, jan.kiszka, Felix Moessbauer
The do_fetch_common_source task has a hidden dependency to having
the source package in isar apt. While this is modeled in bitbake (via
depends to ${BPN}:do_deploy_source), the source package is not there
anymore when running repo_del_package on the -native package.
This happens because the clean task on the -native package calls out to
repo_del_package, which also removes the source package. This deletion
remains hidden to bitbake, hence the ${PN}:do_dpkg_source is not
executed again and the do_fetch_common_source fails, as the source
package is not there anymore.
As it looks like there is no way in reprepro to not delete the source
package, we simply fix it by adding a dependency to BPN:do_clean in case
BPN != PN.
Fixes: 2ca3a7e5 ("dpkg-source: Build source package only once")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
Changes since v2:
- use '==' in comparison to make it similar to the line above
Changes since v1:
- align code style with line above
meta/classes/dpkg-source.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes/dpkg-source.bbclass b/meta/classes/dpkg-source.bbclass
index a2eb37a4..4877abd6 100644
--- a/meta/classes/dpkg-source.bbclass
+++ b/meta/classes/dpkg-source.bbclass
@@ -79,3 +79,4 @@ do_fetch_common_source() {
addtask fetch_common_source
do_dpkg_build[depends] += "${@'${PN}:do_dpkg_source' if '${PN}' == '${BPN}' else '${PN}:do_fetch_common_source'}"
+do_clean[depends] += "${@'' if '${PN}' == '${BPN}' else '${BPN}:do_clean'}"
--
2.50.1
--
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/20250821092335.29895-1-felix.moessbauer%40siemens.com.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v3 1/1] run clean task of BPN as well when cleaning PN
2025-08-21 9:23 [PATCH v3 1/1] run clean task of BPN as well when cleaning PN 'Felix Moessbauer' via isar-users
@ 2025-08-21 9:24 ` 'Jan Kiszka' via isar-users
0 siblings, 0 replies; 2+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-08-21 9:24 UTC (permalink / raw)
To: Felix Moessbauer, isar-users
Cc: adriaan.schmidt, amikan, cedric.hombourger, florian.bezdeka, stefan-koch
On 21.08.25 11:23, Felix Moessbauer wrote:
> The do_fetch_common_source task has a hidden dependency to having
> the source package in isar apt. While this is modeled in bitbake (via
> depends to ${BPN}:do_deploy_source), the source package is not there
> anymore when running repo_del_package on the -native package.
>
> This happens because the clean task on the -native package calls out to
> repo_del_package, which also removes the source package. This deletion
> remains hidden to bitbake, hence the ${PN}:do_dpkg_source is not
> executed again and the do_fetch_common_source fails, as the source
> package is not there anymore.
>
> As it looks like there is no way in reprepro to not delete the source
> package, we simply fix it by adding a dependency to BPN:do_clean in case
> BPN != PN.
>
> Fixes: 2ca3a7e5 ("dpkg-source: Build source package only once")
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> Changes since v2:
>
> - use '==' in comparison to make it similar to the line above
>
> Changes since v1:
>
> - align code style with line above
>
> meta/classes/dpkg-source.bbclass | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/meta/classes/dpkg-source.bbclass b/meta/classes/dpkg-source.bbclass
> index a2eb37a4..4877abd6 100644
> --- a/meta/classes/dpkg-source.bbclass
> +++ b/meta/classes/dpkg-source.bbclass
> @@ -79,3 +79,4 @@ do_fetch_common_source() {
> addtask fetch_common_source
>
> do_dpkg_build[depends] += "${@'${PN}:do_dpkg_source' if '${PN}' == '${BPN}' else '${PN}:do_fetch_common_source'}"
> +do_clean[depends] += "${@'' if '${PN}' == '${BPN}' else '${BPN}:do_clean'}"
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Thanks,
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
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/7e62d991-4d80-4983-a10e-91f73f528d28%40siemens.com.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-21 9:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-21 9:23 [PATCH v3 1/1] run clean task of BPN as well when cleaning PN 'Felix Moessbauer' via isar-users
2025-08-21 9:24 ` 'Jan Kiszka' via isar-users
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox