summaryrefslogtreecommitdiffstats
path: root/bitbake/doc
diff options
context:
space:
mode:
authorAntonin Godard <antonin.godard@bootlin.com>2025-04-04 17:17:56 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-04-10 11:07:38 +0100
commit43092d6e8d6485c9b4d4808ed8c8172504392f12 (patch)
tree0098d9adfe6ff31a35051dd4195f9482f14333ac /bitbake/doc
parent820824f5fe33f2a3bb84f46a33056cf1c995af32 (diff)
downloadpoky-43092d6e8d6485c9b4d4808ed8c8172504392f12.tar.gz
bitbake: doc/bitbake-user-manual-metadata.rst: fix python task example
Fix the old Python 2 print statement, replace it by a bb.plain() call instead. Also replace time by datetime for a slightly simpler example. [YOCTO #14670] Reported-by: Robert Berger <pokylinux@reliableembeddedsystems.com> (Bitbake rev: 874c607f475f3d60677d2720b80a28d0c2e963c6) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/doc')
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
index 415fbf6d69..db17491787 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
@@ -1405,8 +1405,8 @@ the task and other tasks. Here is an example that shows how to define a
1405task and declare some dependencies:: 1405task and declare some dependencies::
1406 1406
1407 python do_printdate () { 1407 python do_printdate () {
1408 import time 1408 import datetime
1409 print time.strftime('%Y%m%d', time.gmtime()) 1409 bb.plain('Date: %s' % (datetime.date.today()))
1410 } 1410 }
1411 addtask printdate after do_fetch before do_build 1411 addtask printdate after do_fetch before do_build
1412 1412