diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2009-09-06 17:02:55 +0300 |
---|---|---|
committer | Till Maas <opensource@till.name> | 2009-09-16 13:50:56 +0200 |
commit | 2db83a6c2ad1685a3d44caf435e702c5991732d1 (patch) | |
tree | cc9ea5dee553e14976480c41f05d2cc186258d1a /cnucnu/package_list.py | |
parent | e6caf9cd880e57f331f0c2d5a199702ded7e9356 (diff) | |
download | cnucnu-2db83a6c2ad1685a3d44caf435e702c5991732d1.tar.gz cnucnu-2db83a6c2ad1685a3d44caf435e702c5991732d1.tar.xz cnucnu-2db83a6c2ad1685a3d44caf435e702c5991732d1.zip |
Improve cnucnu DEFAULT regex
This default regex catches more tarball types, avoids some false positives and
accepts underscore as the separator between name and version.
Diffstat (limited to 'cnucnu/package_list.py')
-rw-r--r-- | cnucnu/package_list.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cnucnu/package_list.py b/cnucnu/package_list.py index 61f2ea9..8276817 100644 --- a/cnucnu/package_list.py +++ b/cnucnu/package_list.py @@ -115,7 +115,7 @@ class Package(object): def set_regex(self, regex): if regex == "DEFAULT": - regex = "%s-([0-9.]*)\\.[tz][ai][rp]" % re.escape(self.name) + regex = r"\b%s[-_]([^-_\s]+?)\.(?:tar|t[bglx]z|tbz2|zip)\b" % re.escape(self.name) elif regex == "FM-DEFAULT": regex = '<a href="/projects/[^/]*/releases/[0-9]*">([^<]*)</a>' self.__regex = regex |