diff options
Diffstat (limited to 'bitbake/contrib')
-rwxr-xr-x | bitbake/contrib/b4-wrapper-bitbake.py | 40 | ||||
-rw-r--r-- | bitbake/contrib/hashserv/Dockerfile | 2 | ||||
-rw-r--r-- | bitbake/contrib/vim/ftdetect/bitbake.vim | 14 | ||||
-rw-r--r-- | bitbake/contrib/vim/indent/bitbake.vim | 6 | ||||
-rw-r--r-- | bitbake/contrib/vim/syntax/bitbake.vim | 8 |
5 files changed, 60 insertions, 10 deletions
diff --git a/bitbake/contrib/b4-wrapper-bitbake.py b/bitbake/contrib/b4-wrapper-bitbake.py new file mode 100755 index 0000000000..87dff2c3a7 --- /dev/null +++ b/bitbake/contrib/b4-wrapper-bitbake.py | |||
@@ -0,0 +1,40 @@ | |||
1 | #!/usr/bin/env python3 | ||
2 | # | ||
3 | # Copyright OpenEmbedded Contributors | ||
4 | # | ||
5 | # SPDX-License-Identifier: MIT | ||
6 | # | ||
7 | # This script is to be called by b4: | ||
8 | # - through b4.send-auto-cc-cmd with "send-auto-cc-cmd" as first argument, | ||
9 | # | ||
10 | # When send-auto-cc-cmd is passed: | ||
11 | # | ||
12 | # This returns the list of Cc recipients for a patch. | ||
13 | # | ||
14 | # This script takes as stdin a patch. | ||
15 | |||
16 | import subprocess | ||
17 | import sys | ||
18 | |||
19 | cmd = sys.argv[1] | ||
20 | if cmd != "send-auto-cc-cmd": | ||
21 | sys.exit(-1) | ||
22 | |||
23 | patch = sys.stdin.read() | ||
24 | |||
25 | if subprocess.call(["which", "lsdiff"], stdout=subprocess.DEVNULL) != 0: | ||
26 | print("lsdiff missing from host, please install patchutils") | ||
27 | sys.exit(-1) | ||
28 | |||
29 | files = subprocess.check_output(["lsdiff", "--strip-match=1", "--strip=1", "--include=doc/*"], | ||
30 | input=patch, text=True) | ||
31 | if len(files): | ||
32 | print("docs@lists.yoctoproject.org") | ||
33 | else: | ||
34 | # Handle patches made with --no-prefix | ||
35 | files = subprocess.check_output(["lsdiff", "--include=doc/*"], | ||
36 | input=patch, text=True) | ||
37 | if len(files): | ||
38 | print("docs@lists.yoctoproject.org") | ||
39 | |||
40 | sys.exit(0) | ||
diff --git a/bitbake/contrib/hashserv/Dockerfile b/bitbake/contrib/hashserv/Dockerfile index 74b4a3be1d..aec1f86fc9 100644 --- a/bitbake/contrib/hashserv/Dockerfile +++ b/bitbake/contrib/hashserv/Dockerfile | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | FROM alpine:3.13.1 | 12 | FROM alpine:3.13.1 |
13 | 13 | ||
14 | RUN apk add --no-cache python3 | 14 | RUN apk add --no-cache python3 libgcc |
15 | 15 | ||
16 | COPY bin/bitbake-hashserv /opt/bbhashserv/bin/ | 16 | COPY bin/bitbake-hashserv /opt/bbhashserv/bin/ |
17 | COPY lib/hashserv /opt/bbhashserv/lib/hashserv/ | 17 | COPY lib/hashserv /opt/bbhashserv/lib/hashserv/ |
diff --git a/bitbake/contrib/vim/ftdetect/bitbake.vim b/bitbake/contrib/vim/ftdetect/bitbake.vim index 09fc4dc74c..427ab5b987 100644 --- a/bitbake/contrib/vim/ftdetect/bitbake.vim +++ b/bitbake/contrib/vim/ftdetect/bitbake.vim | |||
@@ -11,10 +11,18 @@ if &compatible || version < 600 || exists("b:loaded_bitbake_plugin") | |||
11 | endif | 11 | endif |
12 | 12 | ||
13 | " .bb, .bbappend and .bbclass | 13 | " .bb, .bbappend and .bbclass |
14 | au BufNewFile,BufRead *.{bb,bbappend,bbclass} set filetype=bitbake | 14 | au BufNewFile,BufRead *.{bb,bbappend,bbclass} setfiletype bitbake |
15 | 15 | ||
16 | " .inc | 16 | " .inc -- meanwhile included upstream |
17 | au BufNewFile,BufRead *.inc set filetype=bitbake | 17 | if !has("patch-9.0.0055") |
18 | au BufNewFile,BufRead *.inc call s:BBIncDetect() | ||
19 | def s:BBIncDetect() | ||
20 | l:lines = getline(1) .. getline(2) .. getline(3) | ||
21 | if l:lines =~# '\<\%(require\|inherit\)\>' || lines =~# '[A-Z][A-Za-z0-9_:${}]*\s\+\%(??\|[?:+]\)\?= ' | ||
22 | set filetype bitbake | ||
23 | endif | ||
24 | enddef | ||
25 | endif | ||
18 | 26 | ||
19 | " .conf | 27 | " .conf |
20 | au BufNewFile,BufRead *.conf | 28 | au BufNewFile,BufRead *.conf |
diff --git a/bitbake/contrib/vim/indent/bitbake.vim b/bitbake/contrib/vim/indent/bitbake.vim index 1381034098..7ee9d69938 100644 --- a/bitbake/contrib/vim/indent/bitbake.vim +++ b/bitbake/contrib/vim/indent/bitbake.vim | |||
@@ -40,7 +40,7 @@ set cpo&vim | |||
40 | 40 | ||
41 | let s:maxoff = 50 " maximum number of lines to look backwards for () | 41 | let s:maxoff = 50 " maximum number of lines to look backwards for () |
42 | 42 | ||
43 | function GetPythonIndent(lnum) | 43 | function! GetBBPythonIndent(lnum) |
44 | 44 | ||
45 | " If this line is explicitly joined: If the previous line was also joined, | 45 | " If this line is explicitly joined: If the previous line was also joined, |
46 | " line it up with that one, otherwise add two 'shiftwidth' | 46 | " line it up with that one, otherwise add two 'shiftwidth' |
@@ -257,7 +257,7 @@ let b:did_indent = 1 | |||
257 | setlocal indentkeys+=0\" | 257 | setlocal indentkeys+=0\" |
258 | 258 | ||
259 | 259 | ||
260 | function BitbakeIndent(lnum) | 260 | function! BitbakeIndent(lnum) |
261 | if !has('syntax_items') | 261 | if !has('syntax_items') |
262 | return -1 | 262 | return -1 |
263 | endif | 263 | endif |
@@ -315,7 +315,7 @@ function BitbakeIndent(lnum) | |||
315 | endif | 315 | endif |
316 | 316 | ||
317 | if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1 | 317 | if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1 |
318 | let ret = GetPythonIndent(a:lnum) | 318 | let ret = GetBBPythonIndent(a:lnum) |
319 | " Should normally always be indented by at least one shiftwidth; but allow | 319 | " Should normally always be indented by at least one shiftwidth; but allow |
320 | " return of -1 (defer to autoindent) or -2 (force indent to 0) | 320 | " return of -1 (defer to autoindent) or -2 (force indent to 0) |
321 | if ret == 0 | 321 | if ret == 0 |
diff --git a/bitbake/contrib/vim/syntax/bitbake.vim b/bitbake/contrib/vim/syntax/bitbake.vim index c5ea80fdf2..8f39b8f951 100644 --- a/bitbake/contrib/vim/syntax/bitbake.vim +++ b/bitbake/contrib/vim/syntax/bitbake.vim | |||
@@ -63,13 +63,14 @@ syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s* | |||
63 | 63 | ||
64 | " Includes and requires | 64 | " Includes and requires |
65 | syn keyword bbInclude inherit include require contained | 65 | syn keyword bbInclude inherit include require contained |
66 | syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref | 66 | syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue |
67 | syn match bbIncludeLine "^\(inherit\|include\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest | 67 | syn match bbIncludeLine "^\(inherit\|include\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest |
68 | 68 | ||
69 | " Add taks and similar | 69 | " Add taks and similar |
70 | syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS contained | 70 | syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS contained |
71 | syn match bbStatementRest ".*$" skipwhite contained contains=bbStatement | 71 | syn match bbStatementRest /[^\\]*$/ skipwhite contained contains=bbStatement,bbVarDeref,bbVarPyValue |
72 | syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest | 72 | syn region bbStatementRestCont start=/.*\\$/ end=/^[^\\]*$/ contained contains=bbStatement,bbVarDeref,bbVarPyValue,bbContinue keepend |
73 | syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest,bbStatementRestCont | ||
73 | 74 | ||
74 | " OE Important Functions | 75 | " OE Important Functions |
75 | syn keyword bbOEFunctions do_fetch do_unpack do_patch do_configure do_compile do_stage do_install do_package contained | 76 | syn keyword bbOEFunctions do_fetch do_unpack do_patch do_configure do_compile do_stage do_install do_package contained |
@@ -122,6 +123,7 @@ hi def link bbPyFlag Type | |||
122 | hi def link bbPyDef Statement | 123 | hi def link bbPyDef Statement |
123 | hi def link bbStatement Statement | 124 | hi def link bbStatement Statement |
124 | hi def link bbStatementRest Identifier | 125 | hi def link bbStatementRest Identifier |
126 | hi def link bbStatementRestCont Identifier | ||
125 | hi def link bbOEFunctions Special | 127 | hi def link bbOEFunctions Special |
126 | hi def link bbVarPyValue PreProc | 128 | hi def link bbVarPyValue PreProc |
127 | hi def link bbOverrideOperator Operator | 129 | hi def link bbOverrideOperator Operator |