Skip to content

Commit

Permalink
sysutils/libdnf: Fix regex and duplicate rtti
Browse files Browse the repository at this point in the history
PR:		273044
  • Loading branch information
markjdb authored and yurivict committed Aug 25, 2023
1 parent fc05ffb commit 49b7f1c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions sysutils/libdnf/Makefile
@@ -1,5 +1,6 @@
PORTNAME= libdnf
DISTVERSION= 0.70.2
PORTREVISION= 1
CATEGORIES= sysutils

MAINTAINER= yuri@FreeBSD.org
Expand Down
21 changes: 21 additions & 0 deletions sysutils/libdnf/files/patch-bindings_python_____init____.py
@@ -0,0 +1,21 @@
- from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273044
- fix regex and duplicate rtti

--- bindings/python/__init__.py.orig 2023-07-28 12:49:18 UTC
+++ bindings/python/__init__.py
@@ -6,11 +6,14 @@ from . import error
import sys, os
sys.setdlopenflags(os.RTLD_NOW | os.RTLD_GLOBAL)
from . import error
-sys.setdlopenflags(os.RTLD_NOW)

+# Other modules also need to be loaded with RTLD_GLOBAL to preserve uniqueness
+# of RTTI. There are code paths where an exception thrown in one module is
+# supposed to be caught in another.
from . import common_types
from . import conf
from . import module
from . import repo
from . import transaction
from . import utils
+sys.setdlopenflags(os.RTLD_NOW)
14 changes: 14 additions & 0 deletions sysutils/libdnf/files/patch-libdnf_repo_DependencySplitter.cpp
@@ -0,0 +1,14 @@
- from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273044
- fix regex and duplicate rtti

--- libdnf/repo/DependencySplitter.cpp.orig 2023-07-28 12:49:18 UTC
+++ libdnf/repo/DependencySplitter.cpp
@@ -29,7 +29,7 @@ static const Regex RELDEP_REGEX =
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)

0 comments on commit 49b7f1c

Please sign in to comment.