summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Maas <opensource@till.name>2013-10-07 19:46:41 +0200
committerTill Maas <opensource@till.name>2013-10-07 19:46:41 +0200
commit606929ec95055c59fd7bb9af3b3b2779d1e7d5f0 (patch)
tree423ba23fda7534cf5134d84fef926840602b8765
parentb39ed42f677d9794471defeb30f446e4ffc1799a (diff)
downloadcnucnu-606929ec95055c59fd7bb9af3b3b2779d1e7d5f0.tar.gz
cnucnu-606929ec95055c59fd7bb9af3b3b2779d1e7d5f0.tar.xz
cnucnu-606929ec95055c59fd7bb9af3b3b2779d1e7d5f0.zip
Strip ghc- prefix for HACKAGE-DEFAULT regex
-rwxr-xr-xcnucnu/package_list.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cnucnu/package_list.py b/cnucnu/package_list.py
index 3b6c4cb..948c476 100755
--- a/cnucnu/package_list.py
+++ b/cnucnu/package_list.py
@@ -179,6 +179,10 @@ class Package(object):
# no elif here, because the previous regex aliases are only for name
# altering
if regex == "DEFAULT" or regex == "HACKAGE-DEFAULT":
+ if regex == "HACKAGE-DEFAULT":
+ # strip "ghc-" prefix only if name was not overridden
+ if not name_override and name.startswith("ghc-"):
+ name = name[len("ghc-"):]
regex = \
r"\b%s[-_]" % re.escape(name) + \
r"(?i)" + \