Change the replacement dpkg to respect comment lines in package.whitelist

Review URL: http://codereview.chromium.org/543099
This commit is contained in:
Steve VanDeBogart 2010-01-15 16:54:29 -08:00
parent 3a704ffee4
commit 6a76c4d9b4

View File

@ -53,7 +53,8 @@ is_whitelisted() {
test -f "$whitelist" || return test -f "$whitelist" || return
local checksum=$(md5sum "$1" | awk '{ print $1 }') 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 test $count -ne 0
} }