From 6729c27b67c99cdbdf5f78f4a557422fc716c085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 19 Dec 2023 02:49:06 +0100 Subject: DEB: Automatically add ldconfig trigger if the package contains plugins. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As a result, it is no longer necessary to enforce ldconfig in postinst and postrm scripts and this solves the problem with packages where the ldconfig was not called after installation, but it was needed. This resolves issue TDE/tdemultimedia#29. Signed-off-by: Slávek Banko (cherry picked from commit 34145f8176dbda8170684ae8fcdea0787a904f66) --- dilos/core/tdenetwork/debian/cdbs/debian-tde.mk | 5 +++++ dilos/core/tdenetwork/debian/kdict-trinity.postinst | 16 ---------------- dilos/core/tdenetwork/debian/ksirc-trinity.lintian | 2 -- dilos/core/tdenetwork/debian/ksirc-trinity.postinst | 16 ---------------- .../core/tdenetwork/debian/kwifimanager-trinity.lintian | 2 -- 5 files changed, 5 insertions(+), 36 deletions(-) delete mode 100644 dilos/core/tdenetwork/debian/kdict-trinity.postinst delete mode 100644 dilos/core/tdenetwork/debian/ksirc-trinity.postinst (limited to 'dilos/core/tdenetwork') diff --git a/dilos/core/tdenetwork/debian/cdbs/debian-tde.mk b/dilos/core/tdenetwork/debian/cdbs/debian-tde.mk index e219264f1..82994a844 100644 --- a/dilos/core/tdenetwork/debian/cdbs/debian-tde.mk +++ b/dilos/core/tdenetwork/debian/cdbs/debian-tde.mk @@ -202,6 +202,11 @@ $(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/%: install -p -D -m644 debian/$(cdbs_curpkg).presubj \ debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)/presubj; \ fi + if test -d debian/$(cdbs_curpkg)/usr/lib && \ + test $$(find debian/$(cdbs_curpkg)/usr/lib -name "*.so" | wc -l) -gt 0; then \ + echo "# Triggers added by cdbs/debian-tde.mk" >> debian/.debhelper/generated/$(cdbs_curpkg)/triggers; \ + echo "activate-noawait ldconfig" >> debian/.debhelper/generated/$(cdbs_curpkg)/triggers; \ + fi binary-install/$(DEB_SOURCE_PACKAGE)-doc-html:: set -e; \ diff --git a/dilos/core/tdenetwork/debian/kdict-trinity.postinst b/dilos/core/tdenetwork/debian/kdict-trinity.postinst deleted file mode 100644 index 055be2e09..000000000 --- a/dilos/core/tdenetwork/debian/kdict-trinity.postinst +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# postinst script for kdict-trinity - -set -e -if [ "${BASEDIR:=/}" = "/" ]; then - BASEDIR="" -fi - -#if [ "$1" = "configure" ] ; then - # force ldconfig due to tdeinit library -# ldconfig -#fi - -#DEBHELPER# - -exit 0 diff --git a/dilos/core/tdenetwork/debian/ksirc-trinity.lintian b/dilos/core/tdenetwork/debian/ksirc-trinity.lintian index 58fe394fa..3014f3461 100644 --- a/dilos/core/tdenetwork/debian/ksirc-trinity.lintian +++ b/dilos/core/tdenetwork/debian/ksirc-trinity.lintian @@ -1,3 +1 @@ ksirc-trinity: no-shlibs-control-file usr/lib/libtdeinit_ksirc.so -ksirc-trinity: postinst-must-call-ldconfig usr/lib/libtdeinit_ksirc.so -ksirc-trinity: postrm-should-call-ldconfig usr/lib/libtdeinit_ksirc.so diff --git a/dilos/core/tdenetwork/debian/ksirc-trinity.postinst b/dilos/core/tdenetwork/debian/ksirc-trinity.postinst deleted file mode 100644 index 2c76ed8a9..000000000 --- a/dilos/core/tdenetwork/debian/ksirc-trinity.postinst +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# postinst script for ksirc-trinity - -set -e -if [ "${BASEDIR:=/}" = "/" ]; then - BASEDIR="" -fi - -#if [ "$1" = "configure" ] ; then - # force ldconfig due to tdeinit library -# ldconfig -#fi - -#DEBHELPER# - -exit 0 diff --git a/dilos/core/tdenetwork/debian/kwifimanager-trinity.lintian b/dilos/core/tdenetwork/debian/kwifimanager-trinity.lintian index 7f5348940..0e6408ff4 100644 --- a/dilos/core/tdenetwork/debian/kwifimanager-trinity.lintian +++ b/dilos/core/tdenetwork/debian/kwifimanager-trinity.lintian @@ -1,3 +1 @@ kwifimanager-trinity: no-shlibs-control-file usr/lib/libkwireless.so -kwifimanager-trinity: postinst-must-call-ldconfig usr/lib/libkwireless.so -kwifimanager-trinity: postrm-should-call-ldconfig usr/lib/libkwireless.so -- cgit v1.2.1