summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/admin/software/dmtf.rst3
-rw-r--r--src/software/lmi/software/util/__init__.py8
2 files changed, 6 insertions, 5 deletions
diff --git a/doc/admin/software/dmtf.rst b/doc/admin/software/dmtf.rst
index d68692c..35ca35c 100644
--- a/doc/admin/software/dmtf.rst
+++ b/doc/admin/software/dmtf.rst
@@ -296,6 +296,7 @@ Class overview
------------------------------------------------------------------------------
-.. [1] Precisely they must match following regular expression `r"[\\w.+{}]+"`.
+.. [1] Precisely ``Release`` must match following regular expression ``r"[\\w.+{}]+"``.
+ ``Version`` allows also tilde character: ``r"[~\\w.+{}]+"``.
.. [2] Because internally the query is executed upon the list obtained by
enumeration of instances.
diff --git a/src/software/lmi/software/util/__init__.py b/src/software/lmi/software/util/__init__.py
index 5f601b9..7cfc894 100644
--- a/src/software/lmi/software/util/__init__.py
+++ b/src/software/lmi/software/util/__init__.py
@@ -36,16 +36,16 @@ RE_INSTANCE_ID = re.compile(r'LMI:(?P<clsname>[a-z][a-z_0-9]+):(?P<id>\d+)',
re.IGNORECASE)
RE_EVRA = re.compile(
- r'^(?P<epoch>\d+):(?P<version>[\w.+{}]+)-(?P<release>[\w.+{}]+)'
+ r'^(?P<epoch>\d+):(?P<version>[~\w.+{}]+)-(?P<release>[\w.+{}]+)'
r'\.(?P<arch>[^.]+)$')
RE_NEVRA = re.compile(
- r'^(?P<name>.+)-(?P<evra>(?P<epoch>\d+):(?P<version>[\w.+{}]+)'
+ r'^(?P<name>.+)-(?P<evra>(?P<epoch>\d+):(?P<version>[~\w.+{}]+)'
r'-(?P<release>[\w.+{}]+)\.(?P<arch>[^.]+))$')
RE_NEVRA_OPT_EPOCH = re.compile(
- r'^(?P<name>.+)-(?P<evra>(?:(?P<epoch>\d+):)?(?P<version>[\w.+{}]+)'
+ r'^(?P<name>.+)-(?P<evra>(?:(?P<epoch>\d+):)?(?P<version>[~\w.+{}]+)'
r'-(?P<release>[\w.+{}]+)\.(?P<arch>[^.]+))$')
RE_ENVRA = re.compile(
- r'^(?P<epoch>\d+):(?P<name>.+)-(?P<evra>(?P<version>[\w.+{}]+)'
+ r'^(?P<epoch>\d+):(?P<name>.+)-(?P<evra>(?P<version>[~\w.+{}]+)'
r'-(?P<release>[\w.+{}]+)\.(?P<arch>[^.]+))$')
def _get_distname():