* [PATCH] ptest.bblass: Fix package QA issues when disabled
@ 2014-01-08 7:05 Nathan Rossi
2014-01-08 12:58 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Rossi @ 2014-01-08 7:05 UTC (permalink / raw)
To: openembedded-core
When the ptest distro feature is disabled, a ptest directory is still
created in the install phase, This directory is not cleaned up or
consumed by any package and will throw a QA error, e.g.
ERROR: QA Issue: glib-2.0: Files/directories were installed but not
shipped
/usr/lib/glib-2.0/ptest
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed: do_package_qa
This is caused by the do_install_ptest_base[cleandirs] task flag which
is not setup to be conditional on ptest being enabled. This patch
changes the task flag to emit the cleandirs path only when the ptest
distro feature is enabled.
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
---
meta/classes/ptest.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index ec10f80..3450085 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -49,7 +49,7 @@ do_install_ptest_base() {
fi
}
-do_install_ptest_base[cleandirs] = "${D}${PTEST_PATH}"
+do_install_ptest_base[cleandirs] = "${@['', '${D}${PTEST_PATH}'][(d.getVar('PTEST_ENABLED', True) or '') == '1']}"
addtask configure_ptest_base after do_configure before do_compile
addtask compile_ptest_base after do_compile before do_install
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ptest.bblass: Fix package QA issues when disabled
2014-01-08 7:05 [PATCH] ptest.bblass: Fix package QA issues when disabled Nathan Rossi
@ 2014-01-08 12:58 ` Richard Purdie
2014-01-09 3:54 ` Nathan Rossi
0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2014-01-08 12:58 UTC (permalink / raw)
To: Nathan Rossi; +Cc: openembedded-core
On Wed, 2014-01-08 at 17:05 +1000, Nathan Rossi wrote:
> When the ptest distro feature is disabled, a ptest directory is still
> created in the install phase, This directory is not cleaned up or
> consumed by any package and will throw a QA error, e.g.
>
> ERROR: QA Issue: glib-2.0: Files/directories were installed but not
> shipped
> /usr/lib/glib-2.0/ptest
> ERROR: QA run found fatal errors. Please consider fixing them.
> ERROR: Function failed: do_package_qa
>
> This is caused by the do_install_ptest_base[cleandirs] task flag which
> is not setup to be conditional on ptest being enabled. This patch
> changes the task flag to emit the cleandirs path only when the ptest
> distro feature is enabled.
>
> Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
> ---
> meta/classes/ptest.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
> index ec10f80..3450085 100644
> --- a/meta/classes/ptest.bbclass
> +++ b/meta/classes/ptest.bbclass
> @@ -49,7 +49,7 @@ do_install_ptest_base() {
> fi
> }
>
> -do_install_ptest_base[cleandirs] = "${D}${PTEST_PATH}"
> +do_install_ptest_base[cleandirs] = "${@['', '${D}${PTEST_PATH}'][(d.getVar('PTEST_ENABLED', True) or '') == '1']}"
>
> addtask configure_ptest_base after do_configure before do_compile
> addtask compile_ptest_base after do_compile before do_install
How about we use the new add/deltask api to conditionally add these
tasks only when ptest is enabled?
The number of conditionals in there is getting silly...
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ptest.bblass: Fix package QA issues when disabled
2014-01-08 12:58 ` Richard Purdie
@ 2014-01-09 3:54 ` Nathan Rossi
2014-01-09 11:40 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Rossi @ 2014-01-09 3:54 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core@lists.openembedded.org
> -----Original Message-----
> From: Richard Purdie [mailto:richard.purdie@linuxfoundation.org]
> Sent: Wednesday, January 08, 2014 10:58 PM
> To: Nathan Rossi
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] ptest.bblass: Fix package QA issues when
> disabled
>
> On Wed, 2014-01-08 at 17:05 +1000, Nathan Rossi wrote:
> > When the ptest distro feature is disabled, a ptest directory is still
> > created in the install phase, This directory is not cleaned up or
> > consumed by any package and will throw a QA error, e.g.
> >
> > ERROR: QA Issue: glib-2.0: Files/directories were installed but not
> > shipped
> > /usr/lib/glib-2.0/ptest
> > ERROR: QA run found fatal errors. Please consider fixing them.
> > ERROR: Function failed: do_package_qa
> >
> > This is caused by the do_install_ptest_base[cleandirs] task flag which
> > is not setup to be conditional on ptest being enabled. This patch
> > changes the task flag to emit the cleandirs path only when the ptest
> > distro feature is enabled.
> >
> > Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
> > ---
> > meta/classes/ptest.bbclass | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
> > index ec10f80..3450085 100644
> > --- a/meta/classes/ptest.bbclass
> > +++ b/meta/classes/ptest.bbclass
> > @@ -49,7 +49,7 @@ do_install_ptest_base() {
> > fi
> > }
> >
> > -do_install_ptest_base[cleandirs] = "${D}${PTEST_PATH}"
> > +do_install_ptest_base[cleandirs] = "${@['',
> '${D}${PTEST_PATH}'][(d.getVar('PTEST_ENABLED', True) or '') == '1']}"
> >
> > addtask configure_ptest_base after do_configure before do_compile
> > addtask compile_ptest_base after do_compile before do_install
>
> How about we use the new add/deltask api to conditionally add these
> tasks only when ptest is enabled?
Just wanted to double check, by add/deltask you are referring to calling the bb.build.*task() functions in an anonymous function correct?
>
> The number of conditionals in there is getting silly...
When I respin the patch I will refactor the other conditionals such that it removes all ptest_base tasks when disabled instead of the conditional checks in each task.
Regards,
Nathan
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ptest.bblass: Fix package QA issues when disabled
2014-01-09 3:54 ` Nathan Rossi
@ 2014-01-09 11:40 ` Richard Purdie
0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2014-01-09 11:40 UTC (permalink / raw)
To: Nathan Rossi; +Cc: openembedded-core@lists.openembedded.org
On Thu, 2014-01-09 at 03:54 +0000, Nathan Rossi wrote:
> > -----Original Message-----
> > From: Richard Purdie [mailto:richard.purdie@linuxfoundation.org]
> > Sent: Wednesday, January 08, 2014 10:58 PM
> > To: Nathan Rossi
> > Cc: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [PATCH] ptest.bblass: Fix package QA issues when
> > disabled
> >
> > On Wed, 2014-01-08 at 17:05 +1000, Nathan Rossi wrote:
> > > When the ptest distro feature is disabled, a ptest directory is still
> > > created in the install phase, This directory is not cleaned up or
> > > consumed by any package and will throw a QA error, e.g.
> > >
> > > ERROR: QA Issue: glib-2.0: Files/directories were installed but not
> > > shipped
> > > /usr/lib/glib-2.0/ptest
> > > ERROR: QA run found fatal errors. Please consider fixing them.
> > > ERROR: Function failed: do_package_qa
> > >
> > > This is caused by the do_install_ptest_base[cleandirs] task flag which
> > > is not setup to be conditional on ptest being enabled. This patch
> > > changes the task flag to emit the cleandirs path only when the ptest
> > > distro feature is enabled.
> > >
> > > Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
> > > ---
> > > meta/classes/ptest.bbclass | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
> > > index ec10f80..3450085 100644
> > > --- a/meta/classes/ptest.bbclass
> > > +++ b/meta/classes/ptest.bbclass
> > > @@ -49,7 +49,7 @@ do_install_ptest_base() {
> > > fi
> > > }
> > >
> > > -do_install_ptest_base[cleandirs] = "${D}${PTEST_PATH}"
> > > +do_install_ptest_base[cleandirs] = "${@['',
> > '${D}${PTEST_PATH}'][(d.getVar('PTEST_ENABLED', True) or '') == '1']}"
> > >
> > > addtask configure_ptest_base after do_configure before do_compile
> > > addtask compile_ptest_base after do_compile before do_install
> >
> > How about we use the new add/deltask api to conditionally add these
> > tasks only when ptest is enabled?
>
> Just wanted to double check, by add/deltask you are referring to
> calling the bb.build.*task() functions in an anonymous function
> correct?
Yes.
> > The number of conditionals in there is getting silly...
>
> When I respin the patch I will refactor the other conditionals such
> that it removes all ptest_base tasks when disabled instead of the
> conditional checks in each task.
Sounds good, this should be much neater!
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-09 11:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-08 7:05 [PATCH] ptest.bblass: Fix package QA issues when disabled Nathan Rossi
2014-01-08 12:58 ` Richard Purdie
2014-01-09 3:54 ` Nathan Rossi
2014-01-09 11:40 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox