[PATCH] buildchroot: Install ccache into the buildchroot only when enabled

16 views
Skip to first unread message

Florian Bezdeka

unread,
Jun 10, 2022, 12:28:36 PM6/10/22
to isar-...@googlegroups.com, jan.k...@siemens.com, Florian Bezdeka
This fixes a corner case where the buildchroot is not directly fetched
from Debian upstream repos but from something like a (manually
maintained) snapshot. There is no guarantee that the ccache packet is
available inside the buildchroot packet feed.

As soon as ccache is enabled by setting "USE_CCACHE" to "1" the packet
will be installed into the buildchroot.

Fixes: 20a2ff7704a2 ("meta: Support for ccache for custom packages")
Signed-off-by: Florian Bezdeka <florian...@siemens.com>
---
meta/recipes-devtools/buildchroot/buildchroot.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/buildchroot/buildchroot.inc b/meta/recipes-devtools/buildchroot/buildchroot.inc
index aa190e9..c3067ad 100644
--- a/meta/recipes-devtools/buildchroot/buildchroot.inc
+++ b/meta/recipes-devtools/buildchroot/buildchroot.inc
@@ -32,7 +32,7 @@ BUILDCHROOT_PREINSTALL_COMMON = " \
make \
debhelper \
autotools-dev \
- ccache \
+ ${@ 'ccache' if d.getVar('USE_CCACHE') == '1' else ''} \
dpkg \
locales \
docbook-to-man \
--
2.35.3

Jan Kiszka

unread,
Jun 13, 2022, 3:13:54 AM6/13/22
to Florian Bezdeka, isar-...@googlegroups.com
On 10.06.22 18:28, Florian Bezdeka wrote:
> This fixes a corner case where the buildchroot is not directly fetched
> from Debian upstream repos but from something like a (manually
> maintained) snapshot. There is no guarantee that the ccache packet is
> available inside the buildchroot packet feed.
>
> As soon as ccache is enabled by setting "USE_CCACHE" to "1" the packet
> will be installed into the buildchroot.
>
> Fixes: 20a2ff7704a2 ("meta: Support for ccache for custom packages")

Not really a fix, just a (valid) cleanup.

Jan

> Signed-off-by: Florian Bezdeka <florian...@siemens.com>
> ---
> meta/recipes-devtools/buildchroot/buildchroot.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/buildchroot/buildchroot.inc b/meta/recipes-devtools/buildchroot/buildchroot.inc
> index aa190e9..c3067ad 100644
> --- a/meta/recipes-devtools/buildchroot/buildchroot.inc
> +++ b/meta/recipes-devtools/buildchroot/buildchroot.inc
> @@ -32,7 +32,7 @@ BUILDCHROOT_PREINSTALL_COMMON = " \
> make \
> debhelper \
> autotools-dev \
> - ccache \
> + ${@ 'ccache' if d.getVar('USE_CCACHE') == '1' else ''} \
> dpkg \
> locales \
> docbook-to-man \


--
Siemens AG, Technology
Competence Center Embedded Linux

Anton Mikanovich

unread,
Jun 23, 2022, 2:04:32 PM6/23/22
to Florian Bezdeka, isar-...@googlegroups.com, jan.k...@siemens.com
10.06.2022 19:28, Florian Bezdeka wrote:
> This fixes a corner case where the buildchroot is not directly fetched
> from Debian upstream repos but from something like a (manually
> maintained) snapshot. There is no guarantee that the ccache packet is
> available inside the buildchroot packet feed.
>
> As soon as ccache is enabled by setting "USE_CCACHE" to "1" the packet
> will be installed into the buildchroot.
>
> Signed-off-by: Florian Bezdeka <florian...@siemens.com>
Applied to next, thanks.
Reply all
Reply to author
Forward
0 new messages