diff options
author | Till Maas <opensource@till.name> | 2013-10-03 17:46:59 +0200 |
---|---|---|
committer | Till Maas <opensource@till.name> | 2013-10-03 17:49:57 +0200 |
commit | 8e6a87d616fdb09c906771d31d2ff35e6be635eb (patch) | |
tree | 62443c1995baf2ecdf7c4612d6b836d7b689dd9b | |
parent | c0f8fd8e0a1bf585ea7a688c6cd2094e8236a2b7 (diff) | |
download | cnucnu-8e6a87d616fdb09c906771d31d2ff35e6be635eb.tar.gz cnucnu-8e6a87d616fdb09c906771d31d2ff35e6be635eb.tar.xz cnucnu-8e6a87d616fdb09c906771d31d2ff35e6be635eb.zip |
Adjust HACKAGE aliases
-rwxr-xr-x | cnucnu/package_list.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cnucnu/package_list.py b/cnucnu/package_list.py index e0dc56b..eb0c89f 100755 --- a/cnucnu/package_list.py +++ b/cnucnu/package_list.py @@ -166,7 +166,7 @@ class Package(object): name = name[len("nodejs-"):] # no elif here, because the previous regex aliases are only for name altering - if regex == "DEFAULT": + if regex == "DEFAULT" or regex == "HACKAGE-DEFAULT": regex = \ r"\b%s[-_]" % re.escape(name) + \ r"(?i)" + \ @@ -178,7 +178,7 @@ class Package(object): r"\.(?:tar|t[bglx]z|tbz2|zip)\b" elif regex == "FM-DEFAULT": regex = '<a href="/projects/[^/]*/releases/[0-9]*">([^<]*)</a>' - elif regex == "HACKAGE-DEFAULT" or regex== "DIR-LISTING-DEFAULT": + elif regex == "DIR-LISTING-DEFAULT": regex = 'href="([0-9][0-9.]*)/"' elif regex == "RUBYGEMS-DEFAULT": regex = '"gem_uri":"http:\/\/rubygems.org\/gems\/%s-([0-9.]*?)\.gem"' % re.escape(name) @@ -216,7 +216,7 @@ class Package(object): # strip "ghc-" prefix only if name was not overridden if not name_override and name.startswith("ghc-"): name = name[len("ghc-"):] - url = "http://hackage.haskell.org/packages/archive/%s/" % name + url = "http://hackage.haskell.org/package/%s" % name elif url == "DEBIAN-DEFAULT": url = "http://ftp.debian.org/debian/pool/main/%s/%s/" % (name[0], name) elif url == "GOOGLE-DEFAULT": |