Use the newly added nonetwork task flag to disable network access where possible in unpack/patch/configure/compile/install tasks.
We can't disable networking in sstate tasks due to sstate downloads and also so we can report hash equivalence to the server. Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org> --- meta/classes/base.bbclass | 4 ++++ meta/classes/patch.bbclass | 1 + 2 files changed, 5 insertions(+) diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index b709777f243..e4c6c983b59 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -214,6 +214,7 @@ python create_source_date_epoch_stamp() { oe.reproducible.epochfile_write(source_date_epoch, d.getVar('SDE_FILE'), d) } do_unpack[postfuncs] += "create_source_date_epoch_stamp" +do_unpack[nonetwork] = "1" def get_source_date_epoch_value(d): return oe.reproducible.epochfile_read(d.getVar('SDE_FILE'), d) @@ -358,6 +359,7 @@ base_do_configure() { echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE} fi } +do_configure[nonetwork] = "1" addtask compile after do_configure do_compile[dirs] = "${B}" @@ -368,11 +370,13 @@ base_do_compile() { bbnote "nothing to compile" fi } +do_compile[nonetwork] = "1" addtask install after do_compile do_install[dirs] = "${B}" # Remove and re-create ${D} so that is it guaranteed to be empty do_install[cleandirs] = "${D}" +do_install[nonetwork] = "1" base_do_install() { : diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass index 8de70254919..57aaf7c31d1 100644 --- a/meta/classes/patch.bbclass +++ b/meta/classes/patch.bbclass @@ -164,6 +164,7 @@ patch_do_patch[vardepsexclude] = "PATCHRESOLVE" addtask patch after do_unpack do_patch[dirs] = "${WORKDIR}" +do_patch[nonetwork] = "1" do_patch[depends] = "${PATCHDEPENDENCY}" EXPORT_FUNCTIONS do_patch -- 2.32.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#159965): https://lists.openembedded.org/g/openembedded-core/message/159965 Mute This Topic: https://lists.openembedded.org/mt/87909311/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-