Skip to content

Commit 54cc784

Browse files
jeremyd2019dscho
authored andcommitted
make-file-list.sh: future-proof the pactree output parsing
In c9f04bb (make-file-list: stop being confused by `>=<ver>` in the `pactree` output, 2025-02-10), this script was adjusted to account for `pactree` sometimes specifying version ranges of some dependencies. However, this change was incomplete! It only handles the version ranges that are _currently_ found in Git for Windows, but other version ranges are equally valid. What I came up with to parse a dependency in msys2/pacdb (https://github.com/msys2/pacdb) is: ```source-python _DEPENDRE = re.compile(r'([^<>=]+)(?:(<=|>=|<|>|=)(.*))?') ``` That might be more complicated than we want to use here though. (That gets you 3 match groups: the package name, the relational operator, and the version). We might just as well future-proof it by a simpler solution that nevertheless catches more package version checks. Signed-off-by: Jeremy Drake <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 9518f2c commit 54cc784

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

make-file-list.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pacman_list () {
107107
do
108108
pactree -u "$arg"
109109
done |
110-
sed 's/>.*//' |
110+
sed 's/[<>=].*//' |
111111
grep -v "^\\($(echo $PACKAGE_EXCLUDES | sed \
112112
-e 's/ /\\|/g' \
113113
-e 's/mingw-w64-/&\\(i686\\|x86_64\\|clang-aarch64\\)-/g')\\)\$" |

0 commit comments

Comments
 (0)