Skip to contentSkip to conversation

classes/package: mark PKGDATA_VARS as a dependency of emit_pkgdata

PATCH In review Joshua Watt 2 participants 5 messages May 30, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 classes/package: mark PKGDATA_VARS as a dependency of emit_pkgdata

emit_pkgdata needs to re-run when PKGDATA_VARS changes, but bitbake is unaware of this because the code that uses it is in a python library. Fix this by explicitly marking PKGDATA_VARS as a dependency

---
 meta/classes-global/package.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes-global/package.bbclass +1 -0
index e8055a9cdc5..c466601266e 100644
@@ -381,6 +381,7 @@ python emit_pkgdata() {
     import oe.packagedata
     oe.packagedata.emit_pkgdata(pkgfiles, d)
 }
+emit_pkgdata[vardeps] += "PKGDATA_VARS"
 emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse ${PKGDESTWORK}/runtime-rprovides ${PKGDESTWORK}/extended"
 
 ldconfig_postinst_fragment() {
Signature · 1 line
2.33.0
#1 lore raw
Quoted 14 lines · Joshua Watt

emit_pkgdata needs to re-run when PKGDATA_VARS changes, but bitbake is unaware of this because the code that uses it is in a python library. Fix this by explicitly marking PKGDATA_VARS as a dependency

---
 meta/classes-global/package.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes-global/package.bbclass +0 -0
index e8055a9cdc5..c466601266e 100644

meta/classes-global/package.bbclass python emit_pkgdata() { · line 387

Quoted 7 lines
meta/classes-global/package.bbclass +1 -0
@@ -381,6 +381,7 @@ python emit_pkgdata() {
     import oe.packagedata
     oe.packagedata.emit_pkgdata(pkgfiles, d)
 }
+emit_pkgdata[vardeps] += "PKGDATA_VARS"
 emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse ${PKGDESTWORK}/runtime-rprovides ${PKGDESTWORK}/extended"
 
 ldconfig_postinst_fragment() {

Is the auto dependency code somehow breaking for that function?

Cheers,

Richard

#2 lore raw
Quoted 22 lines · Richard Purdie
Quoted 20 lines · Joshua Watt

emit_pkgdata needs to re-run when PKGDATA_VARS changes, but bitbake is unaware of this because the code that uses it is in a python library. Fix this by explicitly marking PKGDATA_VARS as a dependency

---
 meta/classes-global/package.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes-global/package.bbclass +1 -0
index e8055a9cdc5..c466601266e 100644
@@ -381,6 +381,7 @@ python emit_pkgdata() {
     import oe.packagedata
     oe.packagedata.emit_pkgdata(pkgfiles, d)
 }
+emit_pkgdata[vardeps] += "PKGDATA_VARS"
 emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse ${PKGDESTWORK}/runtime-rprovides ${PKGDESTWORK}/extended"
 
Quoted 3 lines

meta/classes-global/package.bbclass python emit_pkgdata() { · line 387

Quoted 1 line
meta/classes-global/package.bbclass +0 -0
 ldconfig_postinst_fragment() {

Is the auto dependency code somehow breaking for that function?

It empirically seemed to not re-run the functions when I changed that variable as part of a (now abandoned) way to fix the SPDX builds.

I thought the code scanner didn't go into library functions; or am I mistaken there?

Quoted 4 lines

Cheers,

Richard

#3 lore raw
Quoted 28 lines · Joshua Watt
Quoted 22 lines · Richard Purdie
Quoted 20 lines · Joshua Watt

emit_pkgdata needs to re-run when PKGDATA_VARS changes, but bitbake is unaware of this because the code that uses it is in a python library. Fix this by explicitly marking PKGDATA_VARS as a dependency

---
 meta/classes-global/package.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes-global/package.bbclass +1 -0
index e8055a9cdc5..c466601266e 100644
@@ -381,6 +381,7 @@ python emit_pkgdata() {
     import oe.packagedata
     oe.packagedata.emit_pkgdata(pkgfiles, d)
 }
+emit_pkgdata[vardeps] += "PKGDATA_VARS"
 emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse ${PKGDESTWORK}/runtime-rprovides ${PKGDESTWORK}/extended"
 
Quoted 3 lines

meta/classes-global/package.bbclass python emit_pkgdata() { · line 387

Quoted 1 line
meta/classes-global/package.bbclass +0 -0
 ldconfig_postinst_fragment() {

Is the auto dependency code somehow breaking for that function?

Quoted 5 lines

It empirically seemed to not re-run the functions when I changed that variable as part of a (now abandoned) way to fix the SPDX builds.

I thought the code scanner didn't go into library functions; or am I mistaken there?

That used to be the case but I added:

https://git.yoctoproject.org/poky/commit/bitbake/lib?id=f3bcd3c9a91f6212c30b9c778c11f3c8a9f6f1d4
and then:
https://git.yoctoproject.org/poky/commit/bitbake/lib?id=2b406a3174b8142b1ae00e6cff4af43317a78f94

so it should auto-detect dependencies.

It is certainly possible something isn't working but I'd like to understand what...

Cheers,

Richard

#4 lore raw
Quoted 38 lines · Richard Purdie
Quoted 28 lines · Joshua Watt
Quoted 22 lines · Richard Purdie
Quoted 20 lines · Joshua Watt

emit_pkgdata needs to re-run when PKGDATA_VARS changes, but bitbake is unaware of this because the code that uses it is in a python library. Fix this by explicitly marking PKGDATA_VARS as a dependency

---
 meta/classes-global/package.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes-global/package.bbclass +1 -0
index e8055a9cdc5..c466601266e 100644
@@ -381,6 +381,7 @@ python emit_pkgdata() {
     import oe.packagedata
     oe.packagedata.emit_pkgdata(pkgfiles, d)
 }
+emit_pkgdata[vardeps] += "PKGDATA_VARS"
 emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse ${PKGDESTWORK}/runtime-rprovides ${PKGDESTWORK}/extended"
 
Quoted 3 lines

meta/classes-global/package.bbclass python emit_pkgdata() { · line 387

Quoted 1 line
meta/classes-global/package.bbclass +0 -0
 ldconfig_postinst_fragment() {

Is the auto dependency code somehow breaking for that function?

Quoted 5 lines

It empirically seemed to not re-run the functions when I changed that variable as part of a (now abandoned) way to fix the SPDX builds.

I thought the code scanner didn't go into library functions; or am I mistaken there?

That used to be the case but I added:

Quoted 8 lines

https://git.yoctoproject.org/poky/commit/bitbake/lib?id=f3bcd3c9a91f6212c30b9c778c11f3c8a9f6f1d4
and then:
https://git.yoctoproject.org/poky/commit/bitbake/lib?id=2b406a3174b8142b1ae00e6cff4af43317a78f94

so it should auto-detect dependencies.

It is certainly possible something isn't working but I'd like to understand what...

Hmm, good point.... I'm not sure; it's very possible I did something else wrong, let me try again to see what happens

Quoted 4 lines

Cheers,

Richard