Skip to content

Commit

Permalink
reldep_parser: Revert reldep regex to match dnf
Browse files Browse the repository at this point in the history
Fix reldep regex to match the parsing from dnf to work also with expressions without spaces between cmp and evr.
  • Loading branch information
jan-kolarik authored and kontura committed Aug 22, 2023
1 parent 54ab989 commit 78cdf51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libdnf5/solv/reldep_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.

namespace libdnf5::solv {

static const std::regex RELDEP_REGEX("^(\\S*)\\s*(\\S*)?\\s*(\\S*)$");
static const std::regex RELDEP_REGEX("^(\\S*)\\s*(<=|>=|<|>|=)?\\s*(\\S*)$");

static bool set_cmp_type(libdnf5::rpm::Reldep::CmpType * cmp_type, std::string cmp_type_string, long int length) {
if (length == 2) {
Expand Down

0 comments on commit 78cdf51

Please sign in to comment.