Skip to contentSkip to conversation

bitbake: cookerdata: Check duplicated BBFILE_COLLECTIONS

PATCH In review Robert Yang 3 participants 6 messages Jan 25, 2019 – Feb 12, 2019

lore
Share & tools
lore
#0 lore raw

cover bitbake: cookerdata: Check duplicated BBFILE_COLLECTIONS

The following changes since commit 1979d9162a335b7d4718a6697ca57bfa16237f0e:

bitbake: gitsmy.py: Fix unpack of submodules of submodules (2019-01-24 17:45:49 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib rbt/bbfile
http://git.pokylinux.org/cgit.cgi//log/?h=rbt/bbfile

Robert Yang (1):
bitbake: cookerdata: Check duplicated BBFILE_COLLECTIONS

 bitbake/lib/bb/cookerdata.py | 4 ++++
 1 file changed, 4 insertions(+)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 bitbake: cookerdata: Check duplicated BBFILE_COLLECTIONS

It shouldn't work when there are duplicated BBFILE_COLLECTIONS.

---
 bitbake/lib/bb/cookerdata.py | 4 ++++
 1 file changed, 4 insertions(+)
bitbake/lib/bb/cookerdata.py +4 -0
index 5df66e6..09412e2 100644
@@ -391,7 +391,11 @@ class CookerDataBuilder(object):
                 bb.fatal("BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:\n    %s" % "\n    ".join(invalid))
 
             layerseries = set((data.getVar("LAYERSERIES_CORENAMES") or "").split())
+            collections_tmp = collections[:]
             for c in collections:
+                collections_tmp.remove(c)
+                if c in collections_tmp:
+                    bb.fatal("Found duplicated BBFILE_COLLECTIONS '%s', check bblayers.conf or layer.conf to fix it." % c)
                 compat = set((data.getVar("LAYERSERIES_COMPAT_%s" % c) or "").split())
                 if compat and not (compat & layerseries):
                     bb.fatal("Layer %s is not compatible with the core layer which only supports these series: %s (layer is compatible with %s)"
Signature · 1 line
2.7.4
#3 lore raw
Quoted 8 lines · Richard Purdie
Quoted 6 lines · Robert Yang

It shouldn't work when there are duplicated BBFILE_COLLECTIONS.

---
 bitbake/lib/bb/cookerdata.py | 4 ++++
 1 file changed, 4 insertions(+)
Quoted 7 lines

This caused a load of failures on yocto-check-layer:

https://autobuilder.yoctoproject.org/typhoon/#/builders/39/builds/259

We may need to fix that behaviour of that script?

Not sure if this is highlighting a bug or not...

I think it is highlighting a bug in the yocto-check-layer.

I've seen instances in the past where something has failed (or been aborted), and the yocto-check-layer didn't cleanup after itself.

Due to this, we had various configuration files load multiple times (since the layer was loaded multiple times) which caused problems throughout the system.

The yocto-check-layer needs to somehow verify that it's not added the same layer multiple times.

--Mark

Quoted 4 lines

Cheers,

Richard

#4 lore raw
Quoted 19 lines · Mark Hatle
Quoted 8 lines · Richard Purdie
Quoted 6 lines · Robert Yang

It shouldn't work when there are duplicated BBFILE_COLLECTIONS.

---
  bitbake/lib/bb/cookerdata.py | 4 ++++
  1 file changed, 4 insertions(+)
Quoted 7 lines

This caused a load of failures on yocto-check-layer:

https://autobuilder.yoctoproject.org/typhoon/#/builders/39/builds/259

We may need to fix that behaviour of that script?

Not sure if this is highlighting a bug or not...

I think it is highlighting a bug in the yocto-check-layer.

Quoted 8 lines

I've seen instances in the past where something has failed (or been aborted), and the yocto-check-layer didn't cleanup after itself.

Due to this, we had various configuration files load multiple times (since the layer was loaded multiple times) which caused problems throughout the system.

The yocto-check-layer needs to somehow verify that it's not added the same layer multiple times.

Sorry, I just came back from holiday, I will work on it if it has not been fixed.

// Robert

Quoted 9 lines

--Mark

Quoted 4 lines

Cheers,

Richard

#5 lore raw
Quoted 25 lines · Robert Yang
Quoted 22 lines · Mark Hatle
Quoted 8 lines · Richard Purdie
Quoted 6 lines · Robert Yang

It shouldn't work when there are duplicated BBFILE_COLLECTIONS.

---
  bitbake/lib/bb/cookerdata.py | 4 ++++

  1 file changed, 4 insertions(+)
Quoted 7 lines

This caused a load of failures on yocto-check-layer:

https://autobuilder.yoctoproject.org/typhoon/#/builders/39/builds/259

We may need to fix that behaviour of that script?

Not sure if this is highlighting a bug or not...

I think it is highlighting a bug in the yocto-check-layer.

I've seen instances in the past where something has failed (or been aborted), and the yocto-check-layer didn't cleanup after itself.

Quoted 7 lines
Quoted 5 lines

Due to this, we had various configuration files load multiple times (since the layer was loaded multiple times) which caused problems throughout the system.

The yocto-check-layer needs to somehow verify that it's not added the same layer multiple times.

Sorry, I just came back from holiday, I will work on it if it has not been fixed.

I've sent 2 patches in oe-core to fix yocto-check-layer:

http://lists.openembedded.org/pipermail/openembedded-core/2019-February/278919.html

// Robert

Quoted 12 lines

// Robert

Quoted 9 lines

--Mark

Quoted 4 lines

Cheers,

Richard