* [PATCH 1/1] run clean task of BPN as well when cleaning PN
@ 2025-08-20 10:59 'Felix Moessbauer' via isar-users
2025-08-20 16:19 ` 'Jan Kiszka' via isar-users
0 siblings, 1 reply; 2+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2025-08-20 10:59 UTC (permalink / raw)
To: isar-users
Cc: Felix Moessbauer, Schmidt, Adriaan, amikan, cedric.hombourger,
Bezdeka, Florian, Koch, Stefan
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>
---
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..20c082f6 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] += "${@'${BPN}:do_clean' if d.getVar('PN') != d.getVar('BPN') else ''}"
--
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/20250820105908.1902523-1-felix.moessbauer%40siemens.com.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] run clean task of BPN as well when cleaning PN
2025-08-20 10:59 [PATCH 1/1] run clean task of BPN as well when cleaning PN 'Felix Moessbauer' via isar-users
@ 2025-08-20 16:19 ` 'Jan Kiszka' via isar-users
0 siblings, 0 replies; 2+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-08-20 16:19 UTC (permalink / raw)
To: Felix Moessbauer, isar-users
Cc: Schmidt, Adriaan, amikan, cedric.hombourger, Bezdeka, Florian,
Koch, Stefan
On 20.08.25 12:59, 'Felix Moessbauer' via isar-users 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>
> ---
> 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..20c082f6 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] += "${@'${BPN}:do_clean' if d.getVar('PN') != d.getVar('BPN') else ''}"
For the sake of have both neighboring lines in the same visual and
logical style, please use the same test as above.
Makes sense otherwise.
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/afd871b5-e853-4cb2-834c-1c50a6324569%40siemens.com.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-20 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-20 10:59 [PATCH 1/1] run clean task of BPN as well when cleaning PN 'Felix Moessbauer' via isar-users
2025-08-20 16:19 ` '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