Skip to contentSkip to conversation

sstate.bbclass: consider postinstall dependencies too

PATCH Superseded Laurentiu Palcu 4 participants 9 messages Mar 4, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sstate.bbclass: consider postinstall dependencies too

When checking the dependencies in setscene_depvalid(), make sure we also consider those dependencies needed when running the postinstalls on host.

[YOCTO #3918]

---
 meta/classes/sstate.bbclass |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta/classes/sstate.bbclass +7 -1
index 118a28a..be29e52 100644
@@ -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']:
Signature · 1 line
1.7.9.5
#1 lore raw

Shouldn't this list be defined in layer.conf like SIGGEN_EXCLUDERECIPES_ABISAFE, so that other layers can extend that list?

Quoted 64 lines · Laurentiu Palcu

When checking the dependencies in setscene_depvalid(), make sure we also consider those dependencies needed when running the postinstalls on host.

[YOCTO #3918]

---
 meta/classes/sstate.bbclass |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta/classes/sstate.bbclass +0 -0
index 118a28a..be29e52 100644
@@ -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

meta/classes/sstate.bbclass +2 -0
+    def isPostInstDep(x):
+        if x in ["qemu-native", "gdk-pixbuf-native", "gtk+-native",

"qemuwrapper-cross", "depmodwrapper-cross"]:

meta/classes/sstate.bbclass +2 -0
+            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":

meta/classes/sstate.bbclass +0 -0
@@ -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
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#2 lore raw
Quoted 3 lines · Martin Jansa

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

#3 lore raw
Quoted 11 lines · Richard Purdie
Quoted 3 lines · Martin Jansa

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?

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#4 lore raw
Quoted 8 lines · Martin Jansa
Quoted 6 lines

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

#5 lore raw
In reply to Martin Jansa
Quoted 6 lines · Martin Jansa
Quoted 5 lines · Richard Purdie
Quoted 3 lines · Martin Jansa

Shouldn't this list be defined in layer.conf like SIGGEN_EXCLUDERECIPES_ABISAFE, so that other layers can extend that list?

Quoted 9 lines
Quoted 6 lines

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

#6 lore raw
Quoted 14 lines · Laurentiu Palcu
Quoted 11 lines · Martin Jansa
Quoted 10 lines · Richard Purdie
Quoted 3 lines · Martin Jansa

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.

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

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?

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#7 lore raw
Quoted 15 lines · Martin Jansa
Quoted 14 lines · Laurentiu Palcu
Quoted 11 lines · Martin Jansa
Quoted 10 lines · Richard Purdie
Quoted 3 lines · Martin Jansa

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.

Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line

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

#8 lore raw

PATCH v2 1/1 sstate.bbclass: consider postinstall dependencies too

In reply to Laurentiu Palcu

When checking the dependencies in setscene_depvalid(), make sure we also consider those dependencies needed when running the postinstalls on host.

[YOCTO #3918]

---
Changes in v2:
* added systemd-systemctl-native to the list;

Thanks,
Laurentiu

 meta/classes/sstate.bbclass |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta/classes/sstate.bbclass +7 -1
index 118a28a..ef12d97 100644
@@ -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", "systemd-systemctl-native"]:
+            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']:
Signature · 1 line
1.7.9.5