From 5943f92e4c6d52bec6a1e68ad11970da9b8ad643 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 6 Nov 2013 20:33:55 -0600 Subject: 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 --- devel/management/commands/reporead.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'devel') 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()) -- cgit v1.2.3-24-g4f1b