sstate.bbclass: consider postinstall dependencies too

Submitted by Laurentiu Palcu on March 4, 2013, 10:37 a.m.

Details

Message ID 1362393439-23933-1-git-send-email-laurentiu.palcu@intel.com
State New
Headers show

Commit Message

Laurentiu Palcu March 4, 2013, 10:37 a.m.
When checking the dependencies in setscene_depvalid(), make sure we also
consider those dependencies needed when running the postinstalls on
host.

[YOCTO #3918]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 meta/classes/sstate.bbclass |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 118a28a..be29e52 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -640,6 +640,10 @@  def setscene_depvalid(task, taskdependees, notneeded, d):
         if x in ["quilt-native", "autoconf-native", "automake-native", "gnu-config-native", "libtool-native", "pkgconfig-native", "gcc-cross", "binutils-cross", "gcc-cross-initial"]:
             return True
         return False
+    def isPostInstDep(x):
+        if x in ["qemu-native", "gdk-pixbuf-native", "gtk+-native", "qemuwrapper-cross", "depmodwrapper-cross"]:
+            return True
+        return False
 
     # We can skip these "safe" dependencies since the aren't runtime dependencies, just build time
     if isSafeDep(taskdependees[task][0]) and taskdependees[task][1] == "do_populate_sysroot":
@@ -658,8 +662,10 @@  def setscene_depvalid(task, taskdependees, notneeded, d):
         # do_package_write_* and do_package doesn't need do_package
         if taskdependees[task][1] == "do_package" and taskdependees[dep][1] in ['do_package', 'do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata']:
             continue
-        # do_package_write_* and do_package doesn't need do_populate_sysroot
+        # do_package_write_* and do_package doesn't need do_populate_sysroot, unless is a postinstall dependency
         if taskdependees[task][1] == "do_populate_sysroot" and taskdependees[dep][1] in ['do_package', 'do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata']:
+            if isPostInstDep(taskdependees[task][0]) and taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm']:
+                return False
             continue
         # Native/Cross packages don't exist and are noexec anyway
         if isNativeCross(taskdependees[dep][0]) and taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata']:

Comments

Martin Jansa March 4, 2013, 10:51 a.m.
Shouldn't this list be defined in layer.conf like
SIGGEN_EXCLUDERECIPES_ABISAFE, so that other layers can extend that list?


On Mon, Mar 4, 2013 at 11:37 AM, Laurentiu Palcu
<laurentiu.palcu@intel.com>wrote:

> When checking the dependencies in setscene_depvalid(), make sure we also
> consider those dependencies needed when running the postinstalls on
> host.
>
> [YOCTO #3918]
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> ---
>  meta/classes/sstate.bbclass |    8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
> index 118a28a..be29e52 100644
> --- a/meta/classes/sstate.bbclass
> +++ b/meta/classes/sstate.bbclass
> @@ -640,6 +640,10 @@ def setscene_depvalid(task, taskdependees, notneeded,
> d):
>          if x in ["quilt-native", "autoconf-native", "automake-native",
> "gnu-config-native", "libtool-native", "pkgconfig-native", "gcc-cross",
> "binutils-cross", "gcc-cross-initial"]:
>              return True
>          return False
> +    def isPostInstDep(x):
> +        if x in ["qemu-native", "gdk-pixbuf-native", "gtk+-native",
> "qemuwrapper-cross", "depmodwrapper-cross"]:
> +            return True
> +        return False
>
>      # We can skip these "safe" dependencies since the aren't runtime
> dependencies, just build time
>      if isSafeDep(taskdependees[task][0]) and taskdependees[task][1] ==
> "do_populate_sysroot":
> @@ -658,8 +662,10 @@ def setscene_depvalid(task, taskdependees, notneeded,
> d):
>          # do_package_write_* and do_package doesn't need do_package
>          if taskdependees[task][1] == "do_package" and
> taskdependees[dep][1] in ['do_package', 'do_package_write_deb',
> 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata']:
>              continue
> -        # do_package_write_* and do_package doesn't need
> do_populate_sysroot
> +        # do_package_write_* and do_package doesn't need
> do_populate_sysroot, unless is a postinstall dependency
>          if taskdependees[task][1] == "do_populate_sysroot" and
> taskdependees[dep][1] in ['do_package', 'do_package_write_deb',
> 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata']:
> +            if isPostInstDep(taskdependees[task][0]) and
> taskdependees[dep][1] in ['do_package_write_deb', 'do_package_write_ipk',
> 'do_package_write_rpm']:
> +                return False
>              continue
>          # Native/Cross packages don't exist and are noexec anyway
>          if isNativeCross(taskdependees[dep][0]) and taskdependees[dep][1]
> in ['do_package_write_deb', 'do_package_write_ipk', 'do_package_write_rpm',
> 'do_packagedata']:
> --
> 1.7.9.5
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Richard Purdie March 4, 2013, 10:56 a.m.
On Mon, 2013-03-04 at 11:51 +0100, Martin Jansa wrote:
> Shouldn't this list be defined in layer.conf like
> SIGGEN_EXCLUDERECIPES_ABISAFE, so that other layers can extend that
> list?

I'm hoping we only have very small list of these problematic
dependencies. If we end up with a large number of them then yes, we'd
need to abstract it but I'd prefer to avoid that unless proven
necessary.

Is there a specific case you have in mind?

Cheers,

Richard
Martin Jansa March 4, 2013, 11:13 a.m.
On Mon, Mar 04, 2013 at 10:56:12AM +0000, Richard Purdie wrote:
> On Mon, 2013-03-04 at 11:51 +0100, Martin Jansa wrote:
> > Shouldn't this list be defined in layer.conf like
> > SIGGEN_EXCLUDERECIPES_ABISAFE, so that other layers can extend that
> > list?
> 
> I'm hoping we only have very small list of these problematic
> dependencies. If we end up with a large number of them then yes, we'd
> need to abstract it but I'd prefer to avoid that unless proven
> necessary.
> 
> Is there a specific case you have in mind?

Isn't systemd-systemctl-native another candidate to be included?
Ross Burton March 4, 2013, 11:16 a.m.
On 4 March 2013 11:13, Martin Jansa <martin.jansa@gmail.com> wrote:
>> I'm hoping we only have very small list of these problematic
>> dependencies. If we end up with a large number of them then yes, we'd
>> need to abstract it but I'd prefer to avoid that unless proven
>> necessary.
>>
>> Is there a specific case you have in mind?
>
> Isn't systemd-systemctl-native another candidate to be included?

Yes, it is.

Ross
Laurentiu Palcu March 4, 2013, 11:38 a.m.
On 03/04/2013 01:13 PM, Martin Jansa wrote:
> On Mon, Mar 04, 2013 at 10:56:12AM +0000, Richard Purdie wrote:
>> On Mon, 2013-03-04 at 11:51 +0100, Martin Jansa wrote:
>>> Shouldn't this list be defined in layer.conf like
>>> SIGGEN_EXCLUDERECIPES_ABISAFE, so that other layers can extend that
>>> list?
>>
>> I'm hoping we only have very small list of these problematic
>> dependencies. If we end up with a large number of them then yes, we'd
>> need to abstract it but I'd prefer to avoid that unless proven
>> necessary.
>>
>> Is there a specific case you have in mind?
> 
> Isn't systemd-systemctl-native another candidate to be included?
> 
It looks like it should be in the list... I'll resend a new version.

Thanks,
Laurentiu
Martin Jansa March 4, 2013, 11:48 a.m.
On Mon, Mar 04, 2013 at 01:38:33PM +0200, Laurentiu Palcu wrote:
> 
> 
> On 03/04/2013 01:13 PM, Martin Jansa wrote:
> > On Mon, Mar 04, 2013 at 10:56:12AM +0000, Richard Purdie wrote:
> >> On Mon, 2013-03-04 at 11:51 +0100, Martin Jansa wrote:
> >>> Shouldn't this list be defined in layer.conf like
> >>> SIGGEN_EXCLUDERECIPES_ABISAFE, so that other layers can extend that
> >>> list?
> >>
> >> I'm hoping we only have very small list of these problematic
> >> dependencies. If we end up with a large number of them then yes, we'd
> >> need to abstract it but I'd prefer to avoid that unless proven
> >> necessary.
> >>
> >> Is there a specific case you have in mind?
> > 
> > Isn't systemd-systemctl-native another candidate to be included?
> > 
> It looks like it should be in the list... I'll resend a new version.

what about all u-a-native implementations?
Richard Purdie March 4, 2013, 12:09 p.m.
On Mon, 2013-03-04 at 12:48 +0100, Martin Jansa wrote:
> On Mon, Mar 04, 2013 at 01:38:33PM +0200, Laurentiu Palcu wrote:
> > 
> > 
> > On 03/04/2013 01:13 PM, Martin Jansa wrote:
> > > On Mon, Mar 04, 2013 at 10:56:12AM +0000, Richard Purdie wrote:
> > >> On Mon, 2013-03-04 at 11:51 +0100, Martin Jansa wrote:
> > >>> Shouldn't this list be defined in layer.conf like
> > >>> SIGGEN_EXCLUDERECIPES_ABISAFE, so that other layers can extend that
> > >>> list?
> > >>
> > >> I'm hoping we only have very small list of these problematic
> > >> dependencies. If we end up with a large number of them then yes, we'd
> > >> need to abstract it but I'd prefer to avoid that unless proven
> > >> necessary.
> > >>
> > >> Is there a specific case you have in mind?
> > > 
> > > Isn't systemd-systemctl-native another candidate to be included?
> > > 
> > It looks like it should be in the list... I'll resend a new version.
> 
> what about all u-a-native implementations?

Its worth noting that not everything has to be in this list. If the
dependencies get pulled into the rootfs construction by some other
means, we don't need the code here. In this case image.bbclass does:

DEPENDS += "${MLPREFIX}qemuwrapper-cross ${MLPREFIX}depmodwrapper-cross"
do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"

so those aren't strictly needed in the list.

Cheers,

Richard