diff mbox series

findutils: /var is populated by base-files, so no need to repack empty dir

Message ID 20251111052244.3228403-1-vudupa@qti.qualcomm.com
State New
Headers show
Series findutils: /var is populated by base-files, so no need to repack empty dir | expand

Commit Message

Vishwas Udupa Nov. 11, 2025, 5:22 a.m. UTC
findutils installs an empty /var/lib which is already created
by base-files. It doesn't need to be packaged by findutils.

Signed-off-by: Vishwas Udupa <vudupa@qti.qualcomm.com>
---
 meta/recipes-extended/findutils/findutils_4.10.0.bb | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Alexander Kanavin Nov. 11, 2025, 10:39 a.m. UTC | #1
Is there some harm or an error that happens when it is packaged? This
needs an explanation of what the issue is and why is it not observed
in Yocto CI. How can it be seen?

Alex

On Tue, 11 Nov 2025 at 07:06, Vishwas Udupa via lists.openembedded.org
<vudupa=qti.qualcomm.com@lists.openembedded.org> wrote:
>
> findutils installs an empty /var/lib which is already created
> by base-files. It doesn't need to be packaged by findutils.
>
> Signed-off-by: Vishwas Udupa <vudupa@qti.qualcomm.com>
> ---
>  meta/recipes-extended/findutils/findutils_4.10.0.bb | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/recipes-extended/findutils/findutils_4.10.0.bb b/meta/recipes-extended/findutils/findutils_4.10.0.bb
> index 29ad6c7350..8d5c721522 100644
> --- a/meta/recipes-extended/findutils/findutils_4.10.0.bb
> +++ b/meta/recipes-extended/findutils/findutils_4.10.0.bb
> @@ -15,6 +15,10 @@ EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
>  # need od from coreutils for -t option
>  RDEPENDS:${PN}-ptest += "bash sed grep coreutils"
>
> +do_install:append() {
> +       rm -rf ${D}${localstatedir}
> +}
> +
>  do_install_ptest:class-target() {
>         mkdir -p ${D}${PTEST_PATH}/tests/
>         cp ${S}/init.cfg ${D}${PTEST_PATH}
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#226147): https://lists.openembedded.org/g/openembedded-core/message/226147
> Mute This Topic: https://lists.openembedded.org/mt/116234660/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Vishwas Udupa Nov. 12, 2025, 8:22 a.m. UTC | #2
Hi,

There is no error seen, but this helps to align towards stateless system expectations or when updates are done via meta-updater.

Vishwas
Paul Barker Nov. 12, 2025, 10:05 a.m. UTC | #3
Hi Vishwas,

On Wed, 2025-11-12 at 08:22 +0000, Vishwas Udupa wrote:
> Hi,
> 
> There is no error seen, but this helps to align towards stateless
> system expectations or when updates are done via meta-updater.

This explanation needs to be included in the commit message.

> > +do_install:append() {
> > +       rm -rf ${D}${localstatedir}
> > +}

If the directory is empty, please use `rmdir` instead of `rm -rf` so
that we don't accidentally delete wanted files in the future.

Thanks,
diff mbox series

Patch

diff --git a/meta/recipes-extended/findutils/findutils_4.10.0.bb b/meta/recipes-extended/findutils/findutils_4.10.0.bb
index 29ad6c7350..8d5c721522 100644
--- a/meta/recipes-extended/findutils/findutils_4.10.0.bb
+++ b/meta/recipes-extended/findutils/findutils_4.10.0.bb
@@ -15,6 +15,10 @@  EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
 # need od from coreutils for -t option
 RDEPENDS:${PN}-ptest += "bash sed grep coreutils"
 
+do_install:append() {
+	rm -rf ${D}${localstatedir}
+}
+
 do_install_ptest:class-target() {
 	mkdir -p ${D}${PTEST_PATH}/tests/
 	cp ${S}/init.cfg ${D}${PTEST_PATH}