Use :setfiletype instead of :set filetype. The former only sets the
'filetype' option if it has not been set before, which makes it possible
to override the syntax of certain *.inc files in autocommands from e.g.
.vimrc or modelines. All other ftdetect plugins in upstream vim also use
:setfiletype for this reason.
The detection for bitbake *.inc files is now upstream since Vim 9.0
patch 0055 [1]. If we're running an earlier Vim, use the detection
heuristic from upstream [2] to overwrite the filetype explicitely if we
find bitbake code. But don't always assuming that *.inc files are
bitbake files so as not to break Perl, PHP, Assembly, Povray, etc.
[1]: https://github.com/vim/vim/commit/fa49eb482729
[2]: https://github.com/vim/vim/blob/fb49e3cde79d/runtime/autoload/dist/ft.vim#L715
(Bitbake rev: e8efbba5d7bb4b685ed0a9b970e042ad99be8afb)
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
b4[1] is a very nice tool for mail-based contribution. A config[2] file
exists to set up a few defaults. We can use it to set the To recipients
to always add, in our case the mailing list.
This also adds a wrapper script that is called by b4 to figure out which
addresses to put as Cc recipients. Considering that patches to the doc/
directory also need to be sent to the yocto-docs mailing list, this
wrapper handles that. A limitation of the script (lsdiff actually) is
that it doesn't know how to handle empty files, but those should be
of rather rare occurrences.
Because we currently do not have anything to check for patch validity,
remove requirement for b4 prep --check to be run before sending a patch
series, via disable-needs-checking in prep-pre-flight-checks.
[1] https://pypi.org/project/b4/
[2] https://b4.docs.kernel.org/en/latest/config.html
(Bitbake rev: 8843860010c97cc10ff69205d209634639b6c5cd)
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Libgcc is required as a runtime dependency. Without it, we get the
following error:
OSError: Error loading shared library libgcc_s.so.1: No such file or
directory
(Bitbake rev: 95e61f3dacacb3a001d9f0e2db4c4a2960d96640)
Signed-off-by: Jesse Riemens <riemensjesse@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Makes a few improvments to the vim Bitbake syntax plugin:
1) Highlight python expansion expressions "${@...}" in
inherit/include/require
2) Highlight variables "${..}" and python expressions "${@...}" in
addtask/deltask/addhandler
3) Correctly handle multi-line sequences in addtask/deltask/addhanlder
(Bitbake rev: 39691d5d0f44a266f917a13884707283f83543de)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Fixes a few errors when the bitbake indent plugin is reloaded:
1) Define functions with "!" so that vim doens't issue a warning when
they are replaced
2) Rename GetPythonIndent -> GetBBPythonIndent to prevent potential
conflict with other plugins
(Bitbake rev: b7109acb96e416e3c537b6b51f7c1fec2ca89371)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Adds a Dockerfile for building the PR service in a container.
Based on the hash equivalence server container [hashserv].
Use the following environment variables to configure the PR service
container:
- DBFILE: database filename. Default:
/var/lib/bbprserv/prserv.sqlite3.
- LOGFILE: log filename. Default: /var/lib/bbprserv/prserv.log.
- LOGLEVEL: logging level. Default: DEBUG.
- HOST: ip address to bind. Default: 0.0.0.0.
- PORT: port number. Default: 8585.
- DBMODE: database mode. Default: Empty (RW).
Note: DBMODE in RO: "--read-only".
[hashserv]: contrib/hashserv/Dockerfile
(Bitbake rev: a5497428b539e8598263924f63a9df8fe1ea70f9)
(Bitbake rev: 1d05abd92da56e284fcd904cf32bd12485903f10)
Signed-off-by: Daniel Gomez <daniel@qtec.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
When building the Hash Equivalence server Dockerfile, some
dependencies are missing in order to run the hash server properly:
Traceback errors:
Traceback (most recent call last):
File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in <module>
ret = main()
File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main
server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only)
File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server
from . import server
File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in <module>
import bb.asyncrpc
ModuleNotFoundError: No module named 'bb'
Traceback (most recent call last):
File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in <module>
ret = main()
File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main
server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only)
File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server
from . import server
File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in <module>
import bb.asyncrpc
File "/opt/bbhashserv/lib/bb/__init__.py", line 128, in <module>
from bb import fetch2 as fetch
File "/opt/bbhashserv/lib/bb/fetch2/__init__.py", line 1930, in <module>
from . import git
File "/opt/bbhashserv/lib/bb/fetch2/git.py", line 70, in <module>
import bb.progress
File "/opt/bbhashserv/lib/bb/progress.py", line 14, in <module>
import bb.build
File "/opt/bbhashserv/lib/bb/build.py", line 27, in <module>
from bb import data, event, utils
File "/opt/bbhashserv/lib/bb/data.py", line 36, in <module>
from bb import data_smart
File "/opt/bbhashserv/lib/bb/data_smart.py", line 23, in <module>
import bb, bb.codeparser
File "/opt/bbhashserv/lib/bb/codeparser.py", line 26, in <module>
import codegen
ModuleNotFoundError: No module named 'codegen'
Traceback (most recent call last):
File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in <module>
ret = main()
File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main
server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only)
File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server
from . import server
File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in <module>
import bb.asyncrpc
File "/opt/bbhashserv/lib/bb/__init__.py", line 128, in <module>
from bb import fetch2 as fetch
File "/opt/bbhashserv/lib/bb/fetch2/__init__.py", line 1930, in <module>
from . import git
File "/opt/bbhashserv/lib/bb/fetch2/git.py", line 70, in <module>
import bb.progress
File "/opt/bbhashserv/lib/bb/progress.py", line 14, in <module>
import bb.build
File "/opt/bbhashserv/lib/bb/build.py", line 27, in <module>
from bb import data, event, utils
File "/opt/bbhashserv/lib/bb/data.py", line 36, in <module>
from bb import data_smart
File "/opt/bbhashserv/lib/bb/data_smart.py", line 23, in <module>
import bb, bb.codeparser
File "/opt/bbhashserv/lib/bb/codeparser.py", line 32, in <module>
from bb.pysh import pyshyacc, pyshlex
File "/opt/bbhashserv/lib/bb/pysh/pyshyacc.py", line 13, in <module>
import bb.pysh.pyshlex as pyshlex
File "/opt/bbhashserv/lib/bb/pysh/pyshlex.py", line 17, in <module>
from ply import lex
ModuleNotFoundError: No module named 'ply'
Traceback (most recent call last):
File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in <module>
ret = main()
File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main
server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only)
File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server
from . import server
File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in <module>
import bb.asyncrpc
File "/opt/bbhashserv/lib/bb/__init__.py", line 128, in <module>
from bb import fetch2 as fetch
File "/opt/bbhashserv/lib/bb/fetch2/__init__.py", line 1935, in <module>
from . import wget
File "/opt/bbhashserv/lib/bb/fetch2/wget.py", line 30, in <module>
from bs4 import BeautifulSoup
ModuleNotFoundError: No module named 'bs4'
(Bitbake rev: 0bd637acfcba5a44230c291889d2a5ff571cb8c6)
Signed-off-by: Daniel Gomez <daniel@qtec.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
"remove" was accidentally omitted when defining which override operators
should be highlighted
(Bitbake rev: a0248338452f9ec26b588ef83679aca6263e7e76)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Updates the Vim syntax highlighting to account for the new override
syntax and also highlight "append" and "prepend" overrides
(Bitbake rev: 01a6322315a6ff6ab55a349f9fcd1e2d93448bfd)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This runs the overrides conversion script in OE-Core over the bitbake code
base including the docs. A handful of things were excluded in toaster
and for the Changelog file.
(Bitbake rev: 47f8d3b24fd52381bf3b41e2f55a53e57841344c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Adds a Dockerfile for build the reference hash equivalence server in a
container
(Bitbake rev: d9a0a88db5888039bfbb6ce5129b43350f79b1c1)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Adds a contrib/ script that repeatedly runs bitbake and interrupts
parsing to try and reproduce parsing deadlocks.
(Bitbake rev: 0457482e252f216618a6fccad0030fcd6c5a304f)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Updates hash equivalence logging so that the interesting VERBOSE
messages are always logged to the consolelog file so that issues in
individual user builds can be diagnosed. The autobuilder logging config
then updates this so that they also are shown on stdout, since the
consolelog file is not capture there.
In order to facilitate this, 2 new logging handlers were added,
"BitBake.verbconsole" and "BitBake.verbconsolelog". Neither of these
handlers are attached to anything by default, but they will log any
messages that wouldn't otherwise be logged by the normal console or
consolelog handlers. Users can attach whatever loggers the desire to
this handler to get them to appear on the console or in the consolelog,
as demonstrated by the autobuilderlog.json file.
(Bitbake rev: 766587c0baaaeb5cda3e9454395edbb70e33f756)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Adds a configuration file that the autobuilder can use to capture
interesting logging domains above the ones that show up for normal users
on stdout/stderr.
(Bitbake rev: 2259b5172b37442a4e0420a16a7bde9e21ffa086)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Move bitbake.vim from bitbake/contrib/vim/indent to contrib/vim/indent.
(Bitbake rev: d2654a4ad8b0b885feac697448128baf7bf8a1c9)
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
There are much better ways to handle this and most editors shouldn't need this
in modern times, drop the noise from the files. Its not consitently applied
anyway.
(Bitbake rev: 5e43070e3087d09aea2f459b033d035c5ef747d0)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Have a simple tool to dump bb_cache.dat is useful for investigating and
studying bitbake cache. The old contrib/dump_cache.py can dump pn, pv and
packages for it, now enhance it dump everything.
Here is the usage:
$ /path/to/dump_cache.py --help
usage: dump_cache.py [-h] [-r RECIPE] [-m MEMBERS] [-s] cachefile
bb_cache.dat's dumper
positional arguments:
cachefile specify bb_cache.dat
optional arguments:
-h, --help show this help message and exit
-r RECIPE, --recipe RECIPE
specify the recipe, default: all recipes
-m MEMBERS, --members MEMBERS
specify the member, use comma as separator for
multiple ones, default: all members
-s, --skip skip skipped recipes
Use dump_cache.py --help to get help
(Bitbake rev: 104572438dfedf6025fbfd125aef1d56134012e7)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Fixed:
File "bitbake/contrib/dump_cache.py", line 39
print("Error, need one argument!", file=sys.stderr)
(Bitbake rev: 435c6fb838b9f38c0477bcc2f07c8ce22999132b)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Various misc changes to convert bitbake to python3 which don't warrant
separation into separate commits.
(Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Some tweaks to use python 3 syntax in a python 2 compatible way.
(Bitbake rev: 322949c77dbaa4db01b5a43d85b39a2af67ba7b2)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
We don't need the "PR = r0" in the bb, so remove it to avoid misleading
the user.
(Bitbake rev: 17fc0174f177b444815487ba67a5d623e47ee8b1)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
commit 00ca441614695b4261d8d4f31b7ef0e3e3784282
Merge: 8cc367d bb88c0f
Author: Christopher Larson <kergoth@gmail.com>
Date: Thu Aug 22 16:42:42 2013 -0700
Merge pull request #6 from staticshock/multi-line-strings
Remove "keepend" and "excludenl" directives
commit bb88c0fd4ad2b7b9c8c4c73def2b3cb20c473ac3
Author: Anton Backer <olegov@gmail.com>
Date: Sat Jul 13 01:24:15 2013 -0400
Remove "keepend" and "excludenl" directives
It looks like these were never actually used correctly, and were doing
more harm than good. "keepend" on bbString, for instance, prevented
proper nesting of ${@python} in strings. Similarly, a balanced pair of
{ } braces inside a shell function would force the function to terminate
early if the closing brace was on its own line.
So far I've seen absolutely no negative consequences from removing
these, but a bunch of positive consequences.
Fixes#1
commit 8cc367d01f4c699be5fcc072de59e6f2f14a138b
Merge: c58628c eec6b7f
Author: Christopher Larson <kergoth@gmail.com>
Date: Thu Aug 22 09:46:46 2013 -0700
Merge pull request #4 from staticshock/function-names
Parse function names with nested vars
commit c58628ca517cd25985361fc0d27863521cc28a5d
Merge: dfb0f7c a890982
Author: Christopher Larson <kergoth@gmail.com>
Date: Thu Aug 22 09:43:40 2013 -0700
Merge pull request #5 from yoyko/master
syntax: python expansion (${@...}) inside shell functions
commit a890982b7c33a6e363b12d6cb69e22b4bbc0f317
Author: Jozef Šiška <yoyo@ksp.sk>
Date: Thu Aug 22 13:20:45 2013 +0200
syntax: python expansion (${@...}) inside shell functions
Signed-off-by: Jozef Šiška <jsiska@nuvotechnologies.com>
commit eec6b7f6f0472787929f424968f9a0d78ac4af08
Author: Anton Backer <olegov@gmail.com>
Date: Fri Jul 12 22:16:01 2013 -0400
Parse function names with nested vars
For instance, pkg_postinst_${PN}
Fixes#3
commit dfb0f7c0d51556448cba79b474b8c19b9cded9af
Author: Christopher Larson <chris_larson@mentor.com>
Date: Fri Jun 1 18:57:13 2012 -0400
syntax: add ?= flag def
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
commit 589a62a00709ca822a42327e7086008aba2d9933
Author: Christopher Larson <kergoth@gmail.com>
Date: Fri Dec 9 22:25:47 2011 -0700
ftplugin: set commentstring
Signed-off-by: Christopher Larson <kergoth@gmail.com>
commit 7ffc80b3fb4ddf68cc5a69bdc63ab03d70c44f87
Author: Chris Larson <chris_larson@mentor.com>
Date: Thu Jun 2 15:27:48 2011 -0700
Handle +=/=+ for flags
Signed-off-by: Chris Larson <chris_larson@mentor.com>
(Bitbake rev: f5f479bbe9b74622cd54c8d6ba8786661a3ae3e6)
Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Newer versions of git do not have the '-' concatenated command
(Bitbake rev: 7adb05978b917e624016bae1700db23bd280b41a)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Currently, *.bb and *.bbclass files are automatically highlighted and
detected as a bitbake file. Since *.bbappend files are also bitbake
files, vim plugin should automatically detect and highlight it as well.
(Bitbake rev: 0668a0ea968baf930f05806a5452c8dbe4ec35ce)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>