* [PATCH] image-prelink: remove hardcoded reference to /usr/sbin
@ 2011-05-17 11:51 Phil Blundell
2011-05-17 12:02 ` Richard Purdie
0 siblings, 1 reply; 10+ messages in thread
From: Phil Blundell @ 2011-05-17 11:51 UTC (permalink / raw)
To: openembedded-core
---
meta/classes/image-prelink.bbclass | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
index ee0951c..cefd983 100644
--- a/meta/classes/image-prelink.bbclass
+++ b/meta/classes/image-prelink.bbclass
@@ -21,7 +21,7 @@ prelink_image () {
fi
# prelink!
- ${STAGING_DIR_NATIVE}/usr/sbin/prelink --root ${IMAGE_ROOTFS} -amR
+ ${STAGING_DIR_NATIVE}${sbindir}/prelink --root ${IMAGE_ROOTFS} -amR
# Remove the prelink.conf if we had to add it.
if [ "$dummy_prelink_conf" == "true" ]; then
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH] image-prelink: remove hardcoded reference to /usr/sbin
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
0 siblings, 1 reply; 10+ messages in thread
From: Richard Purdie @ 2011-05-17 12:02 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-05-17 at 12:51 +0100, Phil Blundell wrote:
> ---
> meta/classes/image-prelink.bbclass | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
> index ee0951c..cefd983 100644
> --- a/meta/classes/image-prelink.bbclass
> +++ b/meta/classes/image-prelink.bbclass
> @@ -21,7 +21,7 @@ prelink_image () {
> fi
>
> # prelink!
> - ${STAGING_DIR_NATIVE}/usr/sbin/prelink --root ${IMAGE_ROOTFS} -amR
> + ${STAGING_DIR_NATIVE}${sbindir}/prelink --root ${IMAGE_ROOTFS} -amR
>
> # Remove the prelink.conf if we had to add it.
> if [ "$dummy_prelink_conf" == "true" ]; then
I suspect this should be ${sbindir_native} there?
Cheers,
Richard
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] image-prelink: remove hardcoded reference to /usr/sbin
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 15:52 ` [PATCH v3] image-prelink: remove hardcoded path assumptions, don't generate cache file Phil Blundell
0 siblings, 2 replies; 10+ messages in thread
From: Phil Blundell @ 2011-05-17 12:09 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-05-17 at 13:02 +0100, Richard Purdie wrote:
> On Tue, 2011-05-17 at 12:51 +0100, Phil Blundell wrote:
> > ---
> > meta/classes/image-prelink.bbclass | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
> > index ee0951c..cefd983 100644
> > --- a/meta/classes/image-prelink.bbclass
> > +++ b/meta/classes/image-prelink.bbclass
> > @@ -21,7 +21,7 @@ prelink_image () {
> > fi
> >
> > # prelink!
> > - ${STAGING_DIR_NATIVE}/usr/sbin/prelink --root ${IMAGE_ROOTFS} -amR
> > + ${STAGING_DIR_NATIVE}${sbindir}/prelink --root ${IMAGE_ROOTFS} -amR
> >
> > # Remove the prelink.conf if we had to add it.
> > if [ "$dummy_prelink_conf" == "true" ]; then
>
> I suspect this should be ${sbindir_native} there?
Ah yes, I guess it should. I'll verify that that works and send a new
patch later.
On a similar subject, image-prelink also seems to assume that
${sysconfdir} == ${sysconfdir_native} == "/etc". That isn't actually
causing me a problem at the moment, because the assumption does happen
to hold for my configuration, but I guess it could do with fixing at
some point.
p.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v2] image-prelink: remove hardcoded path assumptions
2011-05-17 12:09 ` Phil Blundell
@ 2011-05-17 14:17 ` Phil Blundell
2011-05-17 14:35 ` Richard Purdie
2011-05-17 15:52 ` [PATCH v3] image-prelink: remove hardcoded path assumptions, don't generate cache file Phil Blundell
1 sibling, 1 reply; 10+ messages in thread
From: Phil Blundell @ 2011-05-17 14:17 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
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
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v2] image-prelink: remove hardcoded path assumptions
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
0 siblings, 2 replies; 10+ messages in thread
From: Richard Purdie @ 2011-05-17 14:35 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-05-17 at 15:17 +0100, Phil Blundell wrote:
> 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
> -
The patch description and what it does don't quite match (the rm is
removed and options are added to prelink).
Cheers,
Richard
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v2] image-prelink: remove hardcoded path assumptions
2011-05-17 14:35 ` Richard Purdie
@ 2011-05-17 14:45 ` Mark Hatle
2011-05-17 14:47 ` Phil Blundell
1 sibling, 0 replies; 10+ messages in thread
From: Mark Hatle @ 2011-05-17 14:45 UTC (permalink / raw)
To: openembedded-core
On 5/17/11 9:35 AM, Richard Purdie wrote:
> On Tue, 2011-05-17 at 15:17 +0100, Phil Blundell wrote:
>> 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
...
>> # 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
...
>>
>> - # Cleanup temporary file, it's not needed...
>> - rm -f ${IMAGE_ROOTFS}/etc/prelink.cache
>> -
>
> The patch description and what it does don't quite match (the rm is
> removed and options are added to prelink).
I agree the commit message needs some more description. Just as an FYI. The -N
option causes the prelinker to not generate/save the cache file. While the -c
tells it to read a specific .conf file.
So the actual code changes are good, the description is the only thing that
needs to be improved, so someone not familiar with the prelinker can understand
the change.
--Mark
> Cheers,
>
> Richard
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v2] image-prelink: remove hardcoded path assumptions
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
1 sibling, 1 reply; 10+ messages in thread
From: Phil Blundell @ 2011-05-17 14:47 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-05-17 at 15:35 +0100, Richard Purdie wrote:
> The patch description and what it does don't quite match (the rm is
> removed and options are added to prelink).
The added "-c ..." option is necessary in case ${sysconfdir_native} and
${sysconfdir} are not the same thing.
The "-N" tells prelink to not generate a cache file, which seems a
better plan than having it generate one which we then have to delete.
But I can drop that change, and/or send it as a separate patch if you
prefer.
p.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v2] image-prelink: remove hardcoded path assumptions
2011-05-17 14:47 ` Phil Blundell
@ 2011-05-17 15:17 ` Richard Purdie
0 siblings, 0 replies; 10+ messages in thread
From: Richard Purdie @ 2011-05-17 15:17 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-05-17 at 15:47 +0100, Phil Blundell wrote:
> On Tue, 2011-05-17 at 15:35 +0100, Richard Purdie wrote:
> > The patch description and what it does don't quite match (the rm is
> > removed and options are added to prelink).
>
> The added "-c ..." option is necessary in case ${sysconfdir_native} and
> ${sysconfdir} are not the same thing.
>
> The "-N" tells prelink to not generate a cache file, which seems a
> better plan than having it generate one which we then have to delete.
> But I can drop that change, and/or send it as a separate patch if you
> prefer.
I'm fine with the change, I'd just like the commit message to match :)
Cheers,
Richard
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3] image-prelink: remove hardcoded path assumptions, don't generate cache file
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 15:52 ` Phil Blundell
2011-05-17 16:07 ` Richard Purdie
1 sibling, 1 reply; 10+ messages in thread
From: Phil Blundell @ 2011-05-17 15:52 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
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
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v3] image-prelink: remove hardcoded path assumptions, don't generate cache file
2011-05-17 15:52 ` [PATCH v3] image-prelink: remove hardcoded path assumptions, don't generate cache file Phil Blundell
@ 2011-05-17 16:07 ` Richard Purdie
0 siblings, 0 replies; 10+ messages in thread
From: Richard Purdie @ 2011-05-17 16:07 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-05-17 at 16:52 +0100, Phil Blundell wrote:
> 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(-)
Merged to master (will be when it becomes accessible again), thanks.
Richard
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-05-17 16:10 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v3] image-prelink: remove hardcoded path assumptions, don't generate cache file Phil Blundell
2011-05-17 16:07 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox