Patchwork eglibc: Avoid "installed but not shipped" warning for ld.so.conf

login
register
mail settings
Submitter Phil Blundell
Date April 24, 2013, 4:39 p.m.
Message ID <1366821599.14512.59.camel@phil-desktop.brightsign>
Download mbox | patch
Permalink /patch/48759/
State Accepted
Commit 46b021c931684325e4e46712087756354d4459b4
Headers show

Comments

Phil Blundell - April 24, 2013, 4:39 p.m.
If USE_LDCONFIG is not set then we won't ship ld.so.conf.  However,
eglibc still installs it which leads to a QA warning.  Prevent that by
removing the file (and the subsequently-empty directory /etc) in this
situation.

Signed-off-by: Phil Blundell <philb@gnu.org>
---
 meta/recipes-core/eglibc/eglibc-package.inc |   10 ++++++++++
 1 file changed, 10 insertions(+)

Patch

diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
index 88a00a4..f144273 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -84,6 +84,16 @@  do_install_append () {
 	if [ -e "${D}${infodir}/dir" ]; then
 		rm -f ${D}${infodir}/dir
 	fi
+
+	if [ "${USE_LDCONFIG}" != "1" ]; then
+		# We won't ship this file (see FILES above) so let's not install it
+		rm -f ${D}${sysconfdir}/ld.so.conf
+		# This directory will be empty now so remove it too.
+		# But check whether it exists first, since it won't for eglibc-initial.
+		if [ -d ${D}${sysconfdir} ]; then
+			rmdir ${D}${sysconfdir}
+		fi
+	fi
 }
 
 do_install_locale () {