Skip to contentSkip to conversation

lib/oe/sstatesig: Ensure packagegroups don't continually rebuild

PATCH Richard Purdie 2 participants 6 messages Nov 5, 2013 – Nov 8, 2013

lore
Share & tools
lore
#0 lore raw

packagegroups are allarch and shouldn't change depending on the target or machine selected. In general they should have good stable namespaces for their dependencies. As such we can exclude them from rebuilding when dependency checksums change.

---

meta/lib/oe/sstatesig.py +7 -0
index 852fb7e..33ff892 100644
@@ -11,6 +11,9 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
     def isKernel(fn):
         inherits = " ".join(dataCache.inherits[fn])
         return inherits.find("module-base.bbclass") != -1 or inherits.find("linux-kernel-base.bbclass") != -1
+    def isPackageGroup(fn):
+        inherits = " ".join(dataCache.inherits[fn])
+        return "packagegroup.bbclass" in inherits
 
     # Always include our own inter-task dependencies
     if recipename == depname:
@@ -27,6 +30,10 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
 
     # Only target packages beyond here
 
+    # packagegroups are assumed to have well behaved names which don't change between architecures/tunes
+    if isPackageGroup(fn):
+        return False  
+
     # Drop native/cross/nativesdk dependencies from target recipes
     if isNative(depname) or isCross(depname) or isNativeSDK(depname):
         return False
#1 lore raw
Quoted 6 lines · Richard Purdie

packagegroups are allarch and shouldn't change depending on the target or machine selected. In general they should have good stable namespaces for their dependencies. As such we can exclude them from rebuilding when dependency checksums change.

What about machine-base and core-boot? this may change depending on machine.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#2 lore raw
Quoted 10 lines · Otavio Salvador
Quoted 6 lines · Richard Purdie

packagegroups are allarch and shouldn't change depending on the target or machine selected. In general they should have good stable namespaces for their dependencies. As such we can exclude them from rebuilding when dependency checksums change.

What about machine-base and core-boot? this may change depending on machine.

Those already get marked as machine specific. I'd not expect dependencies to be changing package names there for example so I'm not sure this is an issue.

Cheers,

Richard

#3 lore raw
Quoted 8 lines · Richard Purdie
Quoted 7 lines · Otavio Salvador
Quoted 5 lines · Richard Purdie

packagegroups are allarch and shouldn't change depending on the target or machine selected. In general they should have good stable namespaces for their dependencies. As such we can exclude them from rebuilding when dependency checksums change.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

What about machine-base and core-boot? this may change depending on machine.

Those already get marked as machine specific. I'd not expect dependencies to be changing package names there for example so I'm not sure this is an issue.

In:

+ def isPackageGroup(fn):
+ inherits = " ".join(dataCache.inherits[fn])
+ return "packagegroup.bbclass" in inherits

We must check PACKAGE_ARCH, no?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#4 lore raw
Quoted 24 lines · Otavio Salvador
Quoted 8 lines · Richard Purdie
Quoted 7 lines · Otavio Salvador
Quoted 5 lines · Richard Purdie

packagegroups are allarch and shouldn't change depending on the target or machine selected. In general they should have good stable namespaces for their dependencies. As such we can exclude them from rebuilding when dependency checksums change.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

What about machine-base and core-boot? this may change depending on machine.

Those already get marked as machine specific. I'd not expect dependencies to be changing package names there for example so I'm not sure this is an issue.

In:

meta/lib/oe/sstatesig.py +3 -0
+    def isPackageGroup(fn):
+        inherits = " ".join(dataCache.inherits[fn])
+        return "packagegroup.bbclass" in inherits
Quoted 1 line

We must check PACKAGE_ARCH, no?

No. The fact they're marked as MACHINE_ARCH ensures they change when they need to, we don't need sstate to do that as well.

Cheers,

Richard

#5 lore raw
Quoted 21 lines · Richard Purdie
Quoted 20 lines · Otavio Salvador
Quoted 8 lines · Richard Purdie
Quoted 7 lines · Otavio Salvador
Quoted 5 lines · Richard Purdie

packagegroups are allarch and shouldn't change depending on the target or machine selected. In general they should have good stable namespaces for their dependencies. As such we can exclude them from rebuilding when dependency checksums change.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

What about machine-base and core-boot? this may change depending on machine.

Those already get marked as machine specific. I'd not expect dependencies to be changing package names there for example so I'm not sure this is an issue.

In:

Quoted 8 lines
Quoted 5 lines
meta/lib/oe/sstatesig.py +3 -0
+    def isPackageGroup(fn):
+        inherits = " ".join(dataCache.inherits[fn])
+        return "packagegroup.bbclass" in inherits

We must check PACKAGE_ARCH, no?

No. The fact they're marked as MACHINE_ARCH ensures they change when they need to, we don't need sstate to do that as well.

Fine :)

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750