diff options
| author | Jo-Philipp Wich <jo@mein.io> | 2022-09-30 09:59:39 +0200 |
|---|---|---|
| committer | Jo-Philipp Wich <jo@mein.io> | 2022-09-30 10:03:35 +0200 |
| commit | e01e38cf822b77ee9735da1d519f7eb1c48cce19 (patch) | |
| tree | c681cc58a68e8e3e72af00560350db80afb46266 | |
| parent | 30ba27798900a351513372d935c7533d9e658c92 (diff) | |
luci-app-opkg: relax dependency parsing
Align depdendency parse logic with opkg to properly process certain
malformed dependency specifications. In particular do not require a
depdendency specification to end after the closing paren of a version
constraint and perform non-greedy matching in order to extract the
first version constraint only.
Fixes: #5997
Ref: https://forum.openwrt.org/t/x/138328
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 84ba6a5c36072f74721d535104735757b005c8d6)
| -rw-r--r-- | applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js index a019b2cc31..a63928f3e4 100644 --- a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js +++ b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js @@ -571,7 +571,7 @@ function renderDependencies(depends, info) if (deps[i] === 'libc') continue; - if (deps[i].match(/^(.+)\s+\((<=|>=|<<|>>|<|>|=)(.+)\)$/)) { + if (deps[i].match(/^(.+?)\s+\((<=|>=|<<|>>|<|>|=)(.+?)\)/)) { dep = RegExp.$1.trim(); vop = RegExp.$2.trim(); ver = RegExp.$3.trim(); |
