summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/image-prelink.bbclass17
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
index 04dd57c940..ebf6e6d7ee 100644
--- a/meta/classes/image-prelink.bbclass
+++ b/meta/classes/image-prelink.bbclass
@@ -17,6 +17,16 @@ prelink_image () {
17 pre_prelink_size=`du -ks ${IMAGE_ROOTFS} | awk '{size = $1 ; print size }'` 17 pre_prelink_size=`du -ks ${IMAGE_ROOTFS} | awk '{size = $1 ; print size }'`
18 echo "Size before prelinking $pre_prelink_size." 18 echo "Size before prelinking $pre_prelink_size."
19 19
20 # The filesystem may not contain sysconfdir so establish what is present
21 # to enable cleanup after temporary creation of sysconfdir if needed
22 presentdir="${IMAGE_ROOTFS}${sysconfdir}"
23 while [ "${IMAGE_ROOTFS}" != "${presentdir}" ] ; do
24 [ ! -d "${presentdir}" ] || break
25 presentdir=`dirname "${presentdir}"`
26 done
27
28 mkdir -p "${IMAGE_ROOTFS}${sysconfdir}"
29
20 # We need a prelink conf on the filesystem, add one if it's missing 30 # We need a prelink conf on the filesystem, add one if it's missing
21 if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/prelink.conf ]; then 31 if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/prelink.conf ]; then
22 cp ${STAGING_ETCDIR_NATIVE}/prelink.conf \ 32 cp ${STAGING_ETCDIR_NATIVE}/prelink.conf \
@@ -59,6 +69,13 @@ prelink_image () {
59 rm $ldsoconf 69 rm $ldsoconf
60 fi 70 fi
61 71
72 # Remove any directories temporarily created for sysconfdir
73 cleanupdir="${IMAGE_ROOTFS}${sysconfdir}"
74 while [ "${presentdir}" != "${cleanupdir}" ] ; do
75 rmdir "${cleanupdir}"
76 cleanupdir=`dirname ${cleanupdir}`
77 done
78
62 pre_prelink_size=`du -ks ${IMAGE_ROOTFS} | awk '{size = $1 ; print size }'` 79 pre_prelink_size=`du -ks ${IMAGE_ROOTFS} | awk '{size = $1 ; print size }'`
63 echo "Size after prelinking $pre_prelink_size." 80 echo "Size after prelinking $pre_prelink_size."
64} 81}