[Buildroot] [PATCH 2/2] package/dbus: remove /usr/lib/dbus-1.0 if empty
nolange79 at gmail.com
Sun Jun 7 20:57:58 UTC 2020
Am So., 7. Juni 2020 um 10:45 Uhr schrieb Thomas Petazzoni
<thomas.petazzoni at bootlin.com>:
> Hello Norbert,
> On Sun, 7 Jun 2020 00:36:47 +0200
> Norbert Lange <nolange79 at gmail.com> wrote:
> > > Your Signed-off-by is missing, and there is no commit log. We clearly
> > > need a better explanation. And your commit title is wrong: you're not
> > > just removing /usr/lib/dbus-1.0 is empty: you're changing from removing
> > > it unconditionally to removing just /usr/lib/dbus-1.0/include and then
> > > removing /usr/lib/dbus-1.0 if it's empty.
> > Ok, gonna improve that in a v2 if you find no other objections
> My main objection is that we need a better commit log.
> > > So it means that you have installed *something* in /usr/lib/dbus-1.0
> > > that you want Buildroot to keep on the target. But what? This is not
> > > explained in your commit log.
> > I wrote this commit some months ago, would have to outright lie, but I
> > think it was dbusbroker (patch on the ML).
> > The basic gist is, that /usr/lib/dbus-1.0 is some sort of libexec dir
> > (on Debian and Fedora AFAIK), and I believe dbusbroker installs it
> > stuff there.
> > What we really want is to remove the unneeded files (the includes),
> > and the parent directory it is empty.
> Could you verify what dbusbroker installs in this directory, explain
> why it is relevant, and use that as a justification in the commit log ?
> Thanks a lot!
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
turns out I was playing with libexec configuration, and dbus then
places its helpers in /usr/lib/dbus-1.0.
So, it's actually useless for the upstream buildroot (as you wont
allow for libexec config), but it actually wont hurt either.
Amended patch is following.
>From 67c54a18ef08dcb85737381d45c2dfd810c51e59 Mon Sep 17 00:00:00 2001
From: Norbert Lange <nolange79 at gmail.com>
Date: Wed, 15 Jan 2020 11:01:28 +0100
Subject: [PATCH] package/dbus: only remove include directory on target
if using the debian scheme of libexec being /usr/lib/dbus-1.0,
then the dbus-daemon-launch-helper will be installed at that location.
removing the whole directory would remove used files, so
remove the include sub-directory first
and then try to delete /usr/lib/dbus-1.0, silently
failing if non-empty
Signed-off-by: Norbert Lange <nolange79 at gmail.com>
package/dbus/dbus.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/dbus/dbus.mk b/package/dbus/dbus.mk
index bb9f17a5e0..7a7762f537 100644
@@ -80,7 +80,8 @@ endef
DBUS_PRE_INSTALL_TARGET_HOOKS += DBUS_REMOVE_VAR_LIB_DBUS
- rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0
+ rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0/include
+ -rmdir $(TARGET_DIR)/usr/lib/dbus-1.0 2>/dev/null
DBUS_POST_INSTALL_TARGET_HOOKS += DBUS_REMOVE_DEVFILES
More information about the buildroot