Patchwork update-rc.d: Allow to use different initscripts provider

login
register
mail settings
Submitter Martin Jansa
Date June 6, 2014, 4:57 p.m.
Message ID <1402073854-10723-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/73437/
State Accepted
Commit f365b565902879ed9449a6f797f46a630061b153
Headers show

Comments

Martin Jansa - June 6, 2014, 4:57 p.m.
* until now all recipes were respecting VIRTUAL-RUNTIME_initscripts
  variable but commit bba835fed88c3bd5bb5bd58962034aef57c408d8
  hardcoded "initscripts" runtime dependency

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/update-rc.d.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Paul Eggleton - June 17, 2014, 12:33 p.m.
Hi Martin,

On Friday 06 June 2014 18:57:34 Martin Jansa wrote:
> * until now all recipes were respecting VIRTUAL-RUNTIME_initscripts
>   variable but commit bba835fed88c3bd5bb5bd58962034aef57c408d8
>   hardcoded "initscripts" runtime dependency
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/classes/update-rc.d.bbclass | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/update-rc.d.bbclass
> b/meta/classes/update-rc.d.bbclass index ca9486b..19b081d 100644
> --- a/meta/classes/update-rc.d.bbclass
> +++ b/meta/classes/update-rc.d.bbclass
> @@ -1,7 +1,8 @@
>  UPDATERCPN ?= "${PN}"
> 
>  DEPENDS_append = " update-rc.d-native"
> -DEPENDS_append_class-target = " initscripts"
> +VIRTUAL-RUNTIME_initscripts ?= "initscripts"
> +DEPENDS_append_class-target = " ${VIRTUAL-RUNTIME_initscripts}"
>  UPDATERCD = "update-rc.d"
>  UPDATERCD_class-cross = ""
>  UPDATERCD_class-native = ""

Technically this isn't right either though - VIRTUAL-RUNTIME_initscripts is 
for the runtime package name not the recipe as is being added here. It just so 
happens that they are the same thing for initscripts.

Cheers,
Paul
Martin Jansa - June 17, 2014, 12:53 p.m.
On Tue, Jun 17, 2014 at 01:33:17PM +0100, Paul Eggleton wrote:
> Hi Martin,
> 
> On Friday 06 June 2014 18:57:34 Martin Jansa wrote:
> > * until now all recipes were respecting VIRTUAL-RUNTIME_initscripts
> >   variable but commit bba835fed88c3bd5bb5bd58962034aef57c408d8
> >   hardcoded "initscripts" runtime dependency
> > 
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  meta/classes/update-rc.d.bbclass | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta/classes/update-rc.d.bbclass
> > b/meta/classes/update-rc.d.bbclass index ca9486b..19b081d 100644
> > --- a/meta/classes/update-rc.d.bbclass
> > +++ b/meta/classes/update-rc.d.bbclass
> > @@ -1,7 +1,8 @@
> >  UPDATERCPN ?= "${PN}"
> > 
> >  DEPENDS_append = " update-rc.d-native"
> > -DEPENDS_append_class-target = " initscripts"
> > +VIRTUAL-RUNTIME_initscripts ?= "initscripts"
> > +DEPENDS_append_class-target = " ${VIRTUAL-RUNTIME_initscripts}"
> >  UPDATERCD = "update-rc.d"
> >  UPDATERCD_class-cross = ""
> >  UPDATERCD_class-native = ""
> 
> Technically this isn't right either though - VIRTUAL-RUNTIME_initscripts is 
> for the runtime package name not the recipe as is being added here. It just so 
> happens that they are the same thing for initscripts.

Ah, you're right, I was blind when reading DEPENDS (I've even mentioned
runtime dependency in commit message :/), sorry.

Patch

diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index ca9486b..19b081d 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -1,7 +1,8 @@ 
 UPDATERCPN ?= "${PN}"
 
 DEPENDS_append = " update-rc.d-native"
-DEPENDS_append_class-target = " initscripts"
+VIRTUAL-RUNTIME_initscripts ?= "initscripts"
+DEPENDS_append_class-target = " ${VIRTUAL-RUNTIME_initscripts}"
 UPDATERCD = "update-rc.d"
 UPDATERCD_class-cross = ""
 UPDATERCD_class-native = ""