[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r5338 - in glibc-package/branches/eglibc-2.16/debian: . debhelper.in local rules.d



Author: adconrad
Date: 2012-10-26 00:34:46 +0000 (Fri, 26 Oct 2012)
New Revision: 5338

Added:
   glibc-package/branches/eglibc-2.16/debian/debhelper.in/libc-bin.triggers
   glibc-package/branches/eglibc-2.16/debian/local/ldconfig_wrap
Modified:
   glibc-package/branches/eglibc-2.16/debian/changelog
   glibc-package/branches/eglibc-2.16/debian/debhelper.in/libc-bin.lintian-overrides
   glibc-package/branches/eglibc-2.16/debian/debhelper.in/libc-bin.postinst
   glibc-package/branches/eglibc-2.16/debian/rules.d/debhelper.mk
Log:
Port over ldconfig trigger support from Ubuntu packages

Modified: glibc-package/branches/eglibc-2.16/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.16/debian/changelog	2012-10-26 00:32:12 UTC (rev 5337)
+++ glibc-package/branches/eglibc-2.16/debian/changelog	2012-10-26 00:34:46 UTC (rev 5338)
@@ -352,6 +352,8 @@
   * debian/sysdeps/*: clean up use of CC and CXX to match wookey's fixes.
   * debian/control.in/libc: Update nscd/locales breaks to (<< 2.16)
   * debian/rules: Unset CFLAGS and friends and use the package versions.
+  * Move ldconfig to ldconfig.real, install ldconfig wrapper, and set up
+    a dpkg trigger for libc-bin to avoid excessive calls to ldconfig
 
  -- Aurelien Jarno <aurel32@debian.org>  Wed, 25 Jul 2012 23:45:58 +0200
 

Modified: glibc-package/branches/eglibc-2.16/debian/debhelper.in/libc-bin.lintian-overrides
===================================================================
--- glibc-package/branches/eglibc-2.16/debian/debhelper.in/libc-bin.lintian-overrides	2012-10-26 00:32:12 UTC (rev 5337)
+++ glibc-package/branches/eglibc-2.16/debian/debhelper.in/libc-bin.lintian-overrides	2012-10-26 00:34:46 UTC (rev 5338)
@@ -1,6 +1,7 @@
 # ldconfig must be executable even when the libc is not configured, and
 # thus must be linked statically
 libc-bin: statically-linked-binary ./sbin/ldconfig
+libc-bin: statically-linked-binary ./sbin/ldconfig.real
 
 # pt_chown must be setuid root and in /usr/lib, otherwise non-root users
 # won't be able to login
@@ -9,3 +10,6 @@
 
 # libc-bin depending on libc6 make apt crazy...
 libc-bin: missing-depends-line
+
+# ldconfig.real doesn't have a manpage, since it's just ldconfig renamed
+libc-bin: binary-without-manpage sbin/ldconfig.real

Modified: glibc-package/branches/eglibc-2.16/debian/debhelper.in/libc-bin.postinst
===================================================================
--- glibc-package/branches/eglibc-2.16/debian/debhelper.in/libc-bin.postinst	2012-10-26 00:32:12 UTC (rev 5337)
+++ glibc-package/branches/eglibc-2.16/debian/debhelper.in/libc-bin.postinst	2012-10-26 00:34:46 UTC (rev 5338)
@@ -12,6 +12,14 @@
   install_from_default /usr/share/libc-bin/nsswitch.conf /etc/nsswitch.conf
 fi
 
+if [ "$1" = "triggered" ]; then
+  LDCONFIG_NOTRIGGER=y
+  export LDCONFIG_NOTRIGGER
+  echo ldconfig deferred processing now taking place
+  ldconfig || ldconfig --verbose
+  exit 0
+fi
+
 #DEBHELPER#
 
 exit 0

Added: glibc-package/branches/eglibc-2.16/debian/debhelper.in/libc-bin.triggers
===================================================================
--- glibc-package/branches/eglibc-2.16/debian/debhelper.in/libc-bin.triggers	                        (rev 0)
+++ glibc-package/branches/eglibc-2.16/debian/debhelper.in/libc-bin.triggers	2012-10-26 00:34:46 UTC (rev 5338)
@@ -0,0 +1 @@
+interest ldconfig

Added: glibc-package/branches/eglibc-2.16/debian/local/ldconfig_wrap
===================================================================
--- glibc-package/branches/eglibc-2.16/debian/local/ldconfig_wrap	                        (rev 0)
+++ glibc-package/branches/eglibc-2.16/debian/local/ldconfig_wrap	2012-10-26 00:34:46 UTC (rev 5338)
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+if  test $# = 0							\
+    && test x"$LDCONFIG_NOTRIGGER" = x				\
+ && test x"$DPKG_MAINTSCRIPT_PACKAGE" != x			\
+ && dpkg-trigger --check-supported 2>/dev/null
+then
+	if dpkg-trigger --no-await ldconfig; then
+		if test x"$LDCONFIG_TRIGGER_DEBUG" != x; then
+			echo "ldconfig: wrapper deferring update (trigger activated)"
+		fi
+		exit 0
+	fi	
+fi
+
+exec /sbin/ldconfig.real "$@"

Modified: glibc-package/branches/eglibc-2.16/debian/rules.d/debhelper.mk
===================================================================
--- glibc-package/branches/eglibc-2.16/debian/rules.d/debhelper.mk	2012-10-26 00:32:12 UTC (rev 5337)
+++ glibc-package/branches/eglibc-2.16/debian/rules.d/debhelper.mk	2012-10-26 00:34:46 UTC (rev 5338)
@@ -33,6 +33,13 @@
 	dh_link -p$(curpass)
 	dh_bugfiles -p$(curpass)
 
+	if test "$(curpass)" = "libc-bin"; then			\
+	  mv debian/$(curpass)/sbin/ldconfig			\
+	    debian/$(curpass)/sbin/ldconfig.real;		\
+	  install -m755 -o0 -g0 debian/local/ldconfig_wrap	\
+	    debian/$(curpass)/sbin/ldconfig;			\
+	fi
+
 	# extra_debhelper_pkg_install is used for debhelper.mk only.
 	# when you want to install extra packages, use extra_pkg_install.
 	$(call xx,extra_debhelper_pkg_install)
@@ -234,5 +241,6 @@
 	rm -f debian/*.lintian-overrides
 	rm -f debian/*.NEWS
 	rm -f debian/*.README.Debian
+	rm -f debian/*.triggers
 
 	rm -f $(stamp)binaryinst*


Reply to: