Message ID | 20241203045107.3288584-1-Qi.Chen@windriver.com |
---|---|
State | New |
Headers | show |
Series | meta/lib: move buildstats.py and rootfspostcommands.py into oe | expand |
Sorry, the commit message has typos. I've sent out V2. Regards, Qi -----Original Message----- From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Chen Qi via lists.openembedded.org Sent: Tuesday, December 3, 2024 12:51 PM To: openembedded-core@lists.openembedded.org Subject: [OE-core][PATCH] meta/lib: move buildstats.py and rootfspostcommands.py into oe From: Chen Qi <Qi.Chen@windriver.com> These two files are the only ones that are not in left in meta/lib. They logically belong to meta/lie/oe, so move them there. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- meta/classes-global/buildstats.bbclass | 4 ++-- meta/classes-recipe/rootfs-postcommands.bbclass | 8 ++++---- meta/lib/{ => oe}/buildstats.py | 0 meta/lib/{ => oe}/rootfspostcommands.py | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename meta/lib/{ => oe}/buildstats.py (100%) rename meta/lib/{ => oe}/rootfspostcommands.py (100%) diff --git a/meta/classes-global/buildstats.bbclass b/meta/classes-global/buildstats.bbclass index f49a67aa4f..8a50bede5f 100644 --- a/meta/classes-global/buildstats.bbclass +++ b/meta/classes-global/buildstats.bbclass @@ -276,7 +276,7 @@ addhandler run_buildstats run_buildstats[eventmask] = "bb.event.BuildStarted bb.event.BuildCompleted bb.event.HeartbeatEvent bb.build.TaskStarted bb.build.TaskSucceeded bb.build.TaskFailed" python runqueue_stats () { - import buildstats + import oe.buildstats from bb import event, runqueue # We should not record any samples before the first task has started, # because that's the first activity shown in the process chart. @@ -286,7 +286,7 @@ python runqueue_stats () { # closed when the build is done. system_stats = d.getVar('_buildstats_system_stats', False) if not system_stats and isinstance(e, (bb.runqueue.sceneQueueTaskStarted, bb.runqueue.runQueueTaskStarted)): - system_stats = buildstats.SystemStats(d) + system_stats = oe.buildstats.SystemStats(d) d.setVar('_buildstats_system_stats', system_stats) if system_stats: # Ensure that we sample at important events. diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass index 50e77dca76..70ad3670d7 100644 --- a/meta/classes-recipe/rootfs-postcommands.bbclass +++ b/meta/classes-recipe/rootfs-postcommands.bbclass @@ -308,19 +308,19 @@ serial_autologin_root () { } python tidy_shadowutils_files () { - import rootfspostcommands - rootfspostcommands.tidy_shadowutils_files(d.expand('${IMAGE_ROOTFS}${sysconfdir}')) + import oe.rootfspostcommands + + oe.rootfspostcommands.tidy_shadowutils_files(d.expand('${IMAGE_ROOTFS} + ${sysconfdir}')) } python sort_passwd () { """ Deprecated in the favour of tidy_shadowutils_files. """ - import rootfspostcommands + import oe.rootfspostcommands bb.warn('[sort_passwd] You are using a deprecated function for ' 'SORT_PASSWD_POSTPROCESS_COMMAND. The default one is now called ' '"tidy_shadowutils_files".') - rootfspostcommands.tidy_shadowutils_files(d.expand('${IMAGE_ROOTFS}${sysconfdir}')) + + oe.rootfspostcommands.tidy_shadowutils_files(d.expand('${IMAGE_ROOTFS} + ${sysconfdir}')) } # diff --git a/meta/lib/buildstats.py b/meta/lib/oe/buildstats.py similarity index 100% rename from meta/lib/buildstats.py rename to meta/lib/oe/buildstats.py diff --git a/meta/lib/rootfspostcommands.py b/meta/lib/oe/rootfspostcommands.py similarity index 100% rename from meta/lib/rootfspostcommands.py rename to meta/lib/oe/rootfspostcommands.py -- 2.34.1
diff --git a/meta/classes-global/buildstats.bbclass b/meta/classes-global/buildstats.bbclass index f49a67aa4f..8a50bede5f 100644 --- a/meta/classes-global/buildstats.bbclass +++ b/meta/classes-global/buildstats.bbclass @@ -276,7 +276,7 @@ addhandler run_buildstats run_buildstats[eventmask] = "bb.event.BuildStarted bb.event.BuildCompleted bb.event.HeartbeatEvent bb.build.TaskStarted bb.build.TaskSucceeded bb.build.TaskFailed" python runqueue_stats () { - import buildstats + import oe.buildstats from bb import event, runqueue # We should not record any samples before the first task has started, # because that's the first activity shown in the process chart. @@ -286,7 +286,7 @@ python runqueue_stats () { # closed when the build is done. system_stats = d.getVar('_buildstats_system_stats', False) if not system_stats and isinstance(e, (bb.runqueue.sceneQueueTaskStarted, bb.runqueue.runQueueTaskStarted)): - system_stats = buildstats.SystemStats(d) + system_stats = oe.buildstats.SystemStats(d) d.setVar('_buildstats_system_stats', system_stats) if system_stats: # Ensure that we sample at important events. diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass index 50e77dca76..70ad3670d7 100644 --- a/meta/classes-recipe/rootfs-postcommands.bbclass +++ b/meta/classes-recipe/rootfs-postcommands.bbclass @@ -308,19 +308,19 @@ serial_autologin_root () { } python tidy_shadowutils_files () { - import rootfspostcommands - rootfspostcommands.tidy_shadowutils_files(d.expand('${IMAGE_ROOTFS}${sysconfdir}')) + import oe.rootfspostcommands + oe.rootfspostcommands.tidy_shadowutils_files(d.expand('${IMAGE_ROOTFS}${sysconfdir}')) } python sort_passwd () { """ Deprecated in the favour of tidy_shadowutils_files. """ - import rootfspostcommands + import oe.rootfspostcommands bb.warn('[sort_passwd] You are using a deprecated function for ' 'SORT_PASSWD_POSTPROCESS_COMMAND. The default one is now called ' '"tidy_shadowutils_files".') - rootfspostcommands.tidy_shadowutils_files(d.expand('${IMAGE_ROOTFS}${sysconfdir}')) + oe.rootfspostcommands.tidy_shadowutils_files(d.expand('${IMAGE_ROOTFS}${sysconfdir}')) } # diff --git a/meta/lib/buildstats.py b/meta/lib/oe/buildstats.py similarity index 100% rename from meta/lib/buildstats.py rename to meta/lib/oe/buildstats.py diff --git a/meta/lib/rootfspostcommands.py b/meta/lib/oe/rootfspostcommands.py similarity index 100% rename from meta/lib/rootfspostcommands.py rename to meta/lib/oe/rootfspostcommands.py