Skip to content

Commit

Permalink
srcurioptions: allow checksums for file fetchers
Browse files Browse the repository at this point in the history
The bitbake documentation states that file checksums can be specified in
the options of a SRC_URI, not only as a flag for that variable. So allow
these options for the respective file URLs.
  • Loading branch information
amuetzel authored and priv-kweihmann committed Dec 10, 2024
1 parent 6c13335 commit c8c9e9e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
15 changes: 14 additions & 1 deletion oelint_adv/rule_base/rule_var_src_uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ def __init__(self) -> None:
'unpack',
]
self._valid_options = {
'az': [],
'az': [
'md5sum',
'sha256sum',
],
'bzr': [
'protocol',
'scmdata',
Expand Down Expand Up @@ -53,6 +56,8 @@ def __init__(self) -> None:
],
'ftp': [
'downloadfilename',
'md5sum',
'sha256sum',
],
'gs': [
'downloadfilename',
Expand Down Expand Up @@ -114,9 +119,13 @@ def __init__(self) -> None:
],
'http': [
'downloadfilename',
'md5sum',
'sha256sum',
],
'https': [
'downloadfilename',
'md5sum',
'sha256sum',
],
'osc': [
'module',
Expand All @@ -134,10 +143,14 @@ def __init__(self) -> None:
'ssh': [],
's3': [
'downloadfilename',
'md5sum',
'sha256sum',
],
'sftp': [
'downloadfilename',
'md5sum',
'protocol',
'sha256sum',
],
'npm': [
'downloadfilename',
Expand Down
14 changes: 14 additions & 0 deletions tests/test_class_oelint_vars_srcurioptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
'fullpath',
'localdir',
'manifest',
'md5sum',
'method',
'module',
'name',
Expand All @@ -30,6 +31,7 @@
'rsh',
'scmdata',
'ssh',
'sha256sum',
'striplevel',
'subdir',
'subpath',
Expand All @@ -45,8 +47,10 @@
'az': [
'apply',
'destsuffix',
'md5sum',
'name',
'patchdir',
'sha256sum',
'striplevel',
'subdir',
'unpack',
Expand Down Expand Up @@ -117,8 +121,10 @@
'apply',
'destsuffix',
'downloadfilename',
'md5sum',
'name',
'patchdir',
'sha256sum',
'striplevel',
'subdir',
'unpack',
Expand Down Expand Up @@ -210,8 +216,10 @@
'apply',
'destsuffix',
'downloadfilename',
'md5sum',
'name',
'patchdir',
'sha256sum',
'striplevel',
'subdir',
'unpack',
Expand All @@ -220,8 +228,10 @@
'apply',
'destsuffix',
'downloadfilename',
'md5sum',
'name',
'patchdir',
'sha256sum',
'striplevel',
'subdir',
'unpack',
Expand Down Expand Up @@ -273,8 +283,10 @@
'apply',
'destsuffix',
'downloadfilename',
'md5sum',
'name',
'patchdir',
'sha256sum',
'striplevel',
'subdir',
'unpack',
Expand All @@ -283,9 +295,11 @@
'apply',
'destsuffix',
'downloadfilename',
'md5sum',
'name',
'patchdir',
'protocol',
'sha256sum',
'striplevel',
'subdir',
'unpack',
Expand Down

0 comments on commit c8c9e9e

Please sign in to comment.