diff options
author | Dan McGee <dan@archlinux.org> | 2013-11-06 20:33:55 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-11-06 20:33:55 -0600 |
commit | 5943f92e4c6d52bec6a1e68ad11970da9b8ad643 (patch) | |
tree | a539729f9e897fe9f81a3c99f73a8c35f3a4639d /devel | |
parent | 7ac017e1e7884320bd00f67134dd1ae7e06ceaaf (diff) |
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>
Diffstat (limited to 'devel')
-rw-r--r-- | devel/management/commands/reporead.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index a0e77dc7..ff7a8427 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()) |