Skip to content

Commit

Permalink
Avoid using GNU extensions in the dependency splitter regex
Browse files Browse the repository at this point in the history
Sticking to POSIX-compatible extended regular expressions makes the code
more portable.  In particular, this change is required to avoid an abort
at load time on FreeBSD.

No functional change intended.
  • Loading branch information
markjdb committed Aug 24, 2023
1 parent 20b0724 commit 196be80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libdnf/repo/DependencySplitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
namespace libdnf {

static const Regex RELDEP_REGEX =
Regex("^(\\S*)\\s*(<=|>=|<|>|=|==)?\\s*(\\S*)$", REG_EXTENDED);
Regex("^([^[:space:]]*)[[:space:]]*(<=|>=|<|>|=|==)?[[:space:]]*([^[:space:]]*)$", REG_EXTENDED);

static bool
getCmpFlags(int *cmp_type, std::string matchCmpType)
Expand Down

0 comments on commit 196be80

Please sign in to comment.