summaryrefslogtreecommitdiff
path: root/src/lib/libreblacklist
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-05-27 02:08:58 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-05-27 02:08:58 -0400
commit2ad4125443fbccf5e3c955f14dd2dd9c463b2557 (patch)
treedb2d8d04855f994dba81e14ebb035302e50d6b52 /src/lib/libreblacklist
parent4e36277689f92772e474c0829cb7f517aa06d58d (diff)
add tests for libreblacklist, fix a few bugs
Diffstat (limited to 'src/lib/libreblacklist')
-rwxr-xr-xsrc/lib/libreblacklist14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libreblacklist b/src/lib/libreblacklist
index 2f73a06..293f3ac 100755
--- a/src/lib/libreblacklist
+++ b/src/lib/libreblacklist
@@ -73,25 +73,25 @@ blacklist-update() (
blacklist-lookup() {
local pkg=$1
# we accept that $pkg contains no regex-nes
- blacklist-cat | grep "^$pkg:" || true
+ blacklist-normalize | grep "^$pkg:" || true
}
-# Usage: blacklist-{cat|lookup} | blacklist-get-pkg
+# Usage: blacklist-cat | blacklist-get-pkg
# Outputs only the package name field of the blacklist line(s) on stdin.
blacklist-get-pkg() {
- cut -d: -f1
+ blacklist-normalize | cut -d: -f1
}
-# Usage: blacklist-{cat|lookup} | blacklist-get-rep
+# Usage: blacklist-cat | blacklist-get-rep
# Outputs only the replacement package field of the blacklist line(s) on stdin.
blacklist-get-rep() {
- cut -d: -f2
+ blacklist-normalize | cut -d: -f2
}
-# Usage: blacklist-{cat|lookup} | blacklist-get-reason
+# Usage: blacklist-cat | blacklist-get-reason
# Outputs only the reason field of the blacklist line(s) on stdin.
blacklist-get-reason() {
- cut -d: -f3-
+ blacklist-normalize | cut -d: -f3-
}
if [[ "${0##*/}" == libreblacklist ]]; then