All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Blundell <pb@pbcl.net>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v3] image-prelink: remove hardcoded path assumptions, don't generate cache file
Date: Tue, 17 May 2011 16:52:59 +0100	[thread overview]
Message-ID: <1305647579.2429.271.camel@phil-desktop> (raw)
In-Reply-To: <1305634164.2429.193.camel@phil-desktop>

Pass -N option to prelink so that no cache file is generated (obviates need for deleting it afterwards).
Use symbolic names, ${sysconfdir} et al., rather than hardcoded paths. 
Pass explicit -c option to prelink in case ${sysconfdir} and ${sysconfdir_native} are different.

Signed-off-by: Phil Blundell <philb@gnu.org>
---
 meta/classes/image-prelink.bbclass |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
index ee0951c..350c29d 100644
--- a/meta/classes/image-prelink.bbclass
+++ b/meta/classes/image-prelink.bbclass
@@ -12,25 +12,22 @@ prelink_image () {
 	echo "Size before prelinking $pre_prelink_size."
 
 	# We need a prelink conf on the filesystem, add one if it's missing
-	if [ ! -e ${IMAGE_ROOTFS}/etc/prelink.conf ]; then
-		cp ${STAGING_DIR_NATIVE}/etc/prelink.conf \
-			${IMAGE_ROOTFS}/etc/prelink.conf
+	if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/prelink.conf ]; then
+		cp ${STAGING_DIR_NATIVE}${sysconfdir_native}/prelink.conf \
+			${IMAGE_ROOTFS}${sysconfdir}/prelink.conf
 		dummy_prelink_conf=true;
 	else
 		dummy_prelink_conf=false;
 	fi
 
 	# prelink!
-	${STAGING_DIR_NATIVE}/usr/sbin/prelink --root ${IMAGE_ROOTFS} -amR
+	${STAGING_DIR_NATIVE}${sbindir_native}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf
 
 	# Remove the prelink.conf if we had to add it.
 	if [ "$dummy_prelink_conf" == "true" ]; then
-		rm -f ${IMAGE_ROOTFS}/etc/prelink.conf
+		rm -f ${IMAGE_ROOTFS}${sysconfdir}/prelink.conf
 	fi
 
-	# Cleanup temporary file, it's not needed...
-	rm -f ${IMAGE_ROOTFS}/etc/prelink.cache
-
 	pre_prelink_size=`du -ks ${IMAGE_ROOTFS} | awk '{size = $1 ; print size }'`
 	echo "Size after prelinking $pre_prelink_size."
 }
-- 
1.7.1







  parent reply	other threads:[~2011-05-17 15:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 11:51 [PATCH] image-prelink: remove hardcoded reference to /usr/sbin Phil Blundell
2011-05-17 12:02 ` Richard Purdie
2011-05-17 12:09   ` Phil Blundell
2011-05-17 14:17     ` [PATCH v2] image-prelink: remove hardcoded path assumptions Phil Blundell
2011-05-17 14:35       ` Richard Purdie
2011-05-17 14:45         ` Mark Hatle
2011-05-17 14:47         ` Phil Blundell
2011-05-17 15:17           ` Richard Purdie
2011-05-17 15:52     ` Phil Blundell [this message]
2011-05-17 16:07       ` [PATCH v3] image-prelink: remove hardcoded path assumptions, don't generate cache file Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305647579.2429.271.camel@phil-desktop \
    --to=pb@pbcl.net \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.