Skip to contentSkip to conversation

Backport image dependency chain fixes

PATCH In review Andre McCurdy 2 participants 7 messages Feb 21, 2017 – Mar 15, 2017

lore
Share & tools
lore
#0 lore raw

cover Backport image dependency chain fixes

Andre McCurdy (1):
image_types.bbclass: fix image dependency chain collection

Randy Witt (1):
image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion types

 meta/classes/image_types.bbclass | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion types

From: Randy Witt <[email protected]>

Previously if IMAGE_TYPEDEP_* contained a conversion type of the form, "foo.bar", the dependency on CONVERSION_DEPENDS_bar would not get added to the task depends for do_rootfs.

[YOCTO #10883]

(cherry picked from commit 037d39898e0e16c6d5b24a8d3844abfb328d3c14)
---
 meta/classes/image_types.bbclass | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
meta/classes/image_types.bbclass +11 -3
index 1ce8334..5020a5a 100644
@@ -17,17 +17,25 @@ def imagetypes_getdepends(d):
                 d += ":do_populate_sysroot"
             deps.add(d)
 
+    # Take a type in the form of foo.bar.car and split it into the items
+    # needed for the image deps "foo", and the conversion deps ["bar", "car"]
+    def split_types(typestring):
+        types = typestring.split(".")
+        return types[0], types[1:]
+
     fstypes = set((d.getVar('IMAGE_FSTYPES', True) or "").split())
     fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS', True) or "").split())
 
     deps = set()
     for typestring in fstypes:
-        types = typestring.split(".")
-        basetype, resttypes = types[0], types[1:]
-
+        basetype, resttypes = split_types(typestring)
         adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
+
         for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split():
+            base, rest = split_types(typedepends)
+            resttypes += rest
             adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps)
+
         for ctype in resttypes:
             adddep(d.getVar("CONVERSION_DEPENDS_%s" % ctype, True), deps)
             adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 image_types.bbclass: fix image dependency chain collection

In reply to Andre McCurdy

If image type "foo" depends on image type "bar.xz", then dependencies should be collected from the base image type (ie "IMAGE_DEPENDS_bar") not from "IMAGE_DEPENDS_bar.xz".

(cherry picked from commit 8a9f249a9166347cc0468191ce130003e3d306e1)
---
 meta/classes/image_types.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image_types.bbclass +1 -1
index 5020a5a..3bfa60b 100644
@@ -33,8 +33,8 @@ def imagetypes_getdepends(d):
 
         for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split():
             base, rest = split_types(typedepends)
+            adddep(d.getVar('IMAGE_DEPENDS_%s' % base, True) , deps)
             resttypes += rest
-            adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps)
 
         for ctype in resttypes:
             adddep(d.getVar("CONVERSION_DEPENDS_%s" % ctype, True), deps)
Signature · 1 line
1.9.1
#3 lore raw
In reply to Andre McCurdy
Quoted 5 lines · Andre McCurdy

Andre McCurdy (1):
image_types.bbclass: fix image dependency chain collection

Randy Witt (1):
image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion types

Ping (and CC'ing Armin this time...)

Quoted 6 lines
 meta/classes/image_types.bbclass | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

--
1.9.1

#4 lore raw
Quoted 6 lines · Andre McCurdy
Quoted 5 lines · Andre McCurdy

Andre McCurdy (1):
image_types.bbclass: fix image dependency chain collection

Randy Witt (1):
image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion types

I tried applying these changes and they fail. maybe I can grabbing the wrong changes.

- armin

Quoted 9 lines

Ping (and CC'ing Armin this time...)

Quoted 6 lines
  meta/classes/image_types.bbclass | 16 ++++++++++++----
  1 file changed, 12 insertions(+), 4 deletions(-)

--
1.9.1

#5 lore raw
Quoted 5 lines · On Tue, Mar 14, 2017 at 8:08 PM, akuster808 <[email protected]> wrote:
Quoted 4 lines · Andre McCurdy
Quoted 1 line · Andre McCurdy
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

Andre McCurdy (1):
image_types.bbclass: fix image dependency chain collection

Randy Witt (1):
image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion types

I tried applying these changes and they fail. maybe I can grabbing the wrong changes.

You can't cherry-pick the original commits directly from master due to missing getVar() True's. The patches sent to the list were manually fixed up to apply correctly though.

Quoted 15 lines

- armin

Quoted 10 lines

Ping (and CC'ing Armin this time...)

Quoted 6 lines
  meta/classes/image_types.bbclass | 16 ++++++++++++----
  1 file changed, 12 insertions(+), 4 deletions(-)

--
1.9.1

#6 lore raw
Quoted 7 lines · Andre McCurdy
Quoted 6 lines · On Tue, Mar 14, 2017 at 8:08 PM, akuster808 <[email protected]> wrote:
Quoted 5 lines · Andre McCurdy
Quoted 3 lines · Andre McCurdy

Andre McCurdy (1):
image_types.bbclass: fix image dependency chain collection

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

Randy Witt (1):
image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion types

I tried applying these changes and they fail. maybe I can grabbing the wrong changes.

You can't cherry-pick the original commits directly from master due to missing getVar() True's. The patches sent to the list were manually fixed up to apply correctly though.

ok. found them thank. they apply fine.
will be in stagging soon

- armin

Quoted 13 lines
Quoted 13 lines

- armin

Quoted 8 lines

Ping (and CC'ing Armin this time...)

Quoted 6 lines
   meta/classes/image_types.bbclass | 16 ++++++++++++----
   1 file changed, 12 insertions(+), 4 deletions(-)

--
1.9.1