luci-app-opkg: fix parsing package dependencies with version constraints
Due to improper ordering of regexp alternatives, version constraint operators might get undermatched. Fixes: https://github.com/openwrt/openwrt/issues/9982 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
24723a0064
commit
b84791bd02
1 changed files with 1 additions and 1 deletions
|
@ -571,7 +571,7 @@ function renderDependencies(depends, info)
|
||||||
if (deps[i] === 'libc')
|
if (deps[i] === 'libc')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (deps[i].match(/^(.+)\s+\((<=|<|>|>=|=|<<|>>)(.+)\)$/)) {
|
if (deps[i].match(/^(.+)\s+\((<=|>=|<<|>>|<|>|=)(.+)\)$/)) {
|
||||||
dep = RegExp.$1.trim();
|
dep = RegExp.$1.trim();
|
||||||
vop = RegExp.$2.trim();
|
vop = RegExp.$2.trim();
|
||||||
ver = RegExp.$3.trim();
|
ver = RegExp.$3.trim();
|
||||||
|
|
Loading…
Reference in a new issue