Patchwork [v2,1/2] Add new strace-graph package to avoid making perl a dependecy for all of strace

login
register
mail settings
Submitter Matthew McClintock
Date Oct. 27, 2011, 7:31 p.m.
Message ID <1319743874-9891-1-git-send-email-msm@freescale.com>
Download mbox | patch
Permalink /patch/13919/
State New, archived
Headers show

Comments

Matthew McClintock - Oct. 27, 2011, 7:31 p.m.
Signed-off-by: Matthew McClintock <msm@freescale.com>
---
v2: Change to use PACKAGES_prepend instead of explictly listing all packages
and also fixing the fact we missed the -dev and -dbg packages before

 meta/recipes-devtools/strace/strace_4.5.20.bb |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Richard Purdie - Oct. 28, 2011, 8:55 a.m.
On Thu, 2011-10-27 at 14:31 -0500, Matthew McClintock wrote:
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
> v2: Change to use PACKAGES_prepend instead of explictly listing all packages
> and also fixing the fact we missed the -dev and -dbg packages before
> 
>  meta/recipes-devtools/strace/strace_4.5.20.bb |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/recipes-devtools/strace/strace_4.5.20.bb b/meta/recipes-devtools/strace/strace_4.5.20.bb
> index b3d2aa5..450abea 100644
> --- a/meta/recipes-devtools/strace/strace_4.5.20.bb
> +++ b/meta/recipes-devtools/strace/strace_4.5.20.bb
> @@ -5,7 +5,9 @@ LICENSE = "BSD"
>  LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=4535377ede62550fdeaf39f595fd550a"
>  PR = "r2"
>  
> -RDEPENDS = "perl"
> +PACKAGES_prepend = "${PN}-graph "
> +FILES_${PN}-graph = "${bindir}/strace-graph"
> +RDEPENDS_${PN}-graph = "perl"

I should have been clearer in my original email, pretty much every other
recipe uses += or =+ in this context. Whilst the _prepend override is
probably ok, its probably a bit heavy in this case and the standard
operator should work just fine.

Cheers,

Richard
McClintock Matthew-B29882 - Oct. 28, 2011, 3:34 p.m.
On Fri, Oct 28, 2011 at 3:55 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>> -RDEPENDS = "perl"
>> +PACKAGES_prepend = "${PN}-graph "
>> +FILES_${PN}-graph = "${bindir}/strace-graph"
>> +RDEPENDS_${PN}-graph = "perl"
>
> I should have been clearer in my original email, pretty much every other
> recipe uses += or =+ in this context. Whilst the _prepend override is
> probably ok, its probably a bit heavy in this case and the standard
> operator should work just fine.

usr/bin/strace-graph will be picked up by the default rules for ${PN}
- by prepending I thought I was letting strace-graph get picked out
first in ${PN}-graph then everything else could go in ${PN} without
having the explicitly list a new rule for ${PN}.

-M
Phil Blundell - Oct. 28, 2011, 3:54 p.m.
On Fri, 2011-10-28 at 15:34 +0000, McClintock Matthew-B29882 wrote:
> On Fri, Oct 28, 2011 at 3:55 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> >> -RDEPENDS = "perl"
> >> +PACKAGES_prepend = "${PN}-graph "
> >> +FILES_${PN}-graph = "${bindir}/strace-graph"
> >> +RDEPENDS_${PN}-graph = "perl"
> >
> > I should have been clearer in my original email, pretty much every other
> > recipe uses += or =+ in this context. Whilst the _prepend override is
> > probably ok, its probably a bit heavy in this case and the standard
> > operator should work just fine.
> 
> usr/bin/strace-graph will be picked up by the default rules for ${PN}
> - by prepending I thought I was letting strace-graph get picked out
> first in ${PN}-graph then everything else could go in ${PN} without
> having the explicitly list a new rule for ${PN}.

That logic sounds reasonable, but I think Richard's point was that it's
more conventional to use "=+" rather than an override for prepending.

p.
McClintock Matthew-B29882 - Oct. 28, 2011, 8:07 p.m.
On Fri, Oct 28, 2011 at 10:54 AM, Phil Blundell <philb@gnu.org> wrote:
> That logic sounds reasonable, but I think Richard's point was that it's
> more conventional to use "=+" rather than an override for prepending.

I sort of forgot that += and =+ are different. Shall I resubmit this patch?

-M
Paul Eggleton - Oct. 31, 2011, 9:05 a.m.
On Friday 28 October 2011 21:07:44 McClintock Matthew-B29882 wrote:
> On Fri, Oct 28, 2011 at 10:54 AM, Phil Blundell <philb@gnu.org> wrote:
> > That logic sounds reasonable, but I think Richard's point was that it's
> > more conventional to use "=+" rather than an override for prepending.
> 
> I sort of forgot that += and =+ are different. Shall I resubmit this patch?

Yes please.

Cheers,
Paul

Patch

diff --git a/meta/recipes-devtools/strace/strace_4.5.20.bb b/meta/recipes-devtools/strace/strace_4.5.20.bb
index b3d2aa5..450abea 100644
--- a/meta/recipes-devtools/strace/strace_4.5.20.bb
+++ b/meta/recipes-devtools/strace/strace_4.5.20.bb
@@ -5,7 +5,9 @@  LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=4535377ede62550fdeaf39f595fd550a"
 PR = "r2"
 
-RDEPENDS = "perl"
+PACKAGES_prepend = "${PN}-graph "
+FILES_${PN}-graph = "${bindir}/strace-graph"
+RDEPENDS_${PN}-graph = "perl"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
            file://sigmask.patch \