meta-swupdate icon indicating copy to clipboard operation
meta-swupdate copied to clipboard

swupdate-common: fix sha256 regex

Open Louson opened this issue 3 years ago • 2 comments

Change sha256 regex brackets to parenthesis to apply only on line with 'sha256' and 'version'.

Louson avatar Jan 19 '22 17:01 Louson

Fix an issue taht can be reproduced easily: add for any entry in sw-description: hello = "@something" The regex will match and swupdate will look for file 'something'

Or try the python code:

line = "    hello = \"@something\""
re.match(r"^(?P<before_placeholder>.+)[sha256|version].+[=:].*(?P<quote>[\'\"])@(?P<filename>.*)(?P=quote)", line)

which returns a match

Louson avatar Jan 19 '22 17:01 Louson

Seriously. Mailing lists... googlegroups... How could you make that terrific combo that repulse many new user to contribute ? What about making a step in 21st century ?

Louson avatar Jan 20 '22 08:01 Louson