summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-11-07 03:33:55 +0100
committerDan McGee <dan@archlinux.org>2013-11-07 03:33:55 +0100
commit5943f92e4c6d52bec6a1e68ad11970da9b8ad643 (patch)
treea539729f9e897fe9f81a3c99f73a8c35f3a4639d
parent7ac017e1e7884320bd00f67134dd1ae7e06ceaaf (diff)
downloadarchweb-5943f92e4c6d52bec6a1e68ad11970da9b8ad643.tar.gz
archweb-5943f92e4c6d52bec6a1e68ad11970da9b8ad643.tar.xz
Fix parsing of depends with both epoch and description
Not a common case, but one we can and should support and hasn't been noticed up until this point. That pesky colon! Fixes FS#37477. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--devel/management/commands/reporead.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index a0e77dc..ff7a842 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -138,8 +138,8 @@ DEPEND_RE = re.compile(r"^(.+?)((>=|<=|=|>|<)(.+))?$")
def create_depend(package, dep_str, deptype='D'):
depend = Depend(pkg=package, deptype=deptype)
- # lop off any description first
- parts = dep_str.split(':', 1)
+ # lop off any description first, don't get confused by epoch
+ parts = dep_str.split(': ', 1)
if len(parts) > 1:
depend.description = parts[1].strip()
match = DEPEND_RE.match(parts[0].strip())