Skip to content

make-file-list.sh: future-proof the pactree output parsing #596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

dscho
Copy link
Member

@dscho dscho commented Feb 17, 2025

@jeremyd2019 I basically took your suggestion from #591 (comment), ghost-wrote a commit message, and opened this PR. What do you think? Okay?

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]>
@jeremyd2019
Copy link
Contributor

👍

@dscho dscho merged commit 330d494 into main Feb 17, 2025
12 checks passed
@dscho dscho deleted the future-proof-make-file-list branch February 17, 2025 16:36
@dscho dscho mentioned this pull request Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants