From 6a76c4d9b409d6c9a1c62efb2df90daf81444128 Mon Sep 17 00:00:00 2001 From: Steve VanDeBogart Date: Fri, 15 Jan 2010 16:54:29 -0800 Subject: [PATCH] Change the replacement dpkg to respect comment lines in package.whitelist Review URL: http://codereview.chromium.org/543099 --- dpkg_no_scripts.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dpkg_no_scripts.sh b/dpkg_no_scripts.sh index c2cc7c345e..63c1942911 100755 --- a/dpkg_no_scripts.sh +++ b/dpkg_no_scripts.sh @@ -53,7 +53,8 @@ is_whitelisted() { test -f "$whitelist" || return local checksum=$(md5sum "$1" | awk '{ print $1 }') - local count=$(grep -c "$checksum" "${whitelist}" || /bin/true) + local count=$(sed -e "s/#.*$//" "${whitelist}" | grep -c "$checksum" \ + || /bin/true) test $count -ne 0 }