prelink: pull in /etc/cron.daily/prelink in the postinst.
authorChris Larson <clarson@mvista.com>
Wed, 15 Jul 2009 20:23:10 +0000 (13:23 -0700)
committerChris Larson <clarson@mvista.com>
Tue, 3 Nov 2009 20:15:58 +0000 (13:15 -0700)
The cron script obeys /etc/default/prelink, so this ensures that the postinst
also obeys it.  Also changes postrm to use the same logic as the cron script
for the prelink uninstallation.

Signed-off-by: Chris Larson <clarson@mvista.com>
recipes/prelink/prelink_20061027.bb
recipes/prelink/prelink_20071009.bb

index b650c2c..83f33f3 100644 (file)
@@ -4,7 +4,7 @@ DESCRIPTION = " The prelink package contains a utility which modifies ELF shared
 and executables, so that far fewer relocations need to be resolved at \
 runtime and thus programs come up faster."
 LICENSE = "GPL"
-PR = "r5"
+PR = "r6"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \
            file://prelink.conf \
@@ -35,12 +35,15 @@ if [ "x$D" != "x" ]; then
   exit 1
 fi
 
-prelink -a
+. ${sysconfdir}/cron.daily/prelink
 }
 
 pkg_prerm_prelink() {
 #!/bin/sh
 
-prelink -au
+if [ -f ${sysconfdir}/prelink.cache ]; then
+    prelink -au
+    rm -f ${sysconfdir}/prelink.cache
+fi
 }
 
index b650c2c..83f33f3 100644 (file)
@@ -4,7 +4,7 @@ DESCRIPTION = " The prelink package contains a utility which modifies ELF shared
 and executables, so that far fewer relocations need to be resolved at \
 runtime and thus programs come up faster."
 LICENSE = "GPL"
-PR = "r5"
+PR = "r6"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \
            file://prelink.conf \
@@ -35,12 +35,15 @@ if [ "x$D" != "x" ]; then
   exit 1
 fi
 
-prelink -a
+. ${sysconfdir}/cron.daily/prelink
 }
 
 pkg_prerm_prelink() {
 #!/bin/sh
 
-prelink -au
+if [ -f ${sysconfdir}/prelink.cache ]; then
+    prelink -au
+    rm -f ${sysconfdir}/prelink.cache
+fi
 }