From 1ff75ff87fc2a46d1f88918d94be48e5d59e3aab Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 19 Feb 2016 14:28:37 +1100 Subject: [PATCH] Always strip package comments In the "I can't believe I missed this" category -- the existing strip method removes shortest match (%); which fails when you put another # in the comment (like "refer to bug#1234"). Change to the longest match which should strip everything from the first "#" to the end (since that's going to be the longest). Change-Id: I47f5e710ebd87b0f54549732e7d64cf42c7a6b65 --- functions-common | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions-common b/functions-common index 8e5285394c..ed444bbd41 100644 --- a/functions-common +++ b/functions-common @@ -1096,8 +1096,9 @@ function _parse_package_files { continue fi - # Assume we want this package - package=${line%#*} + # Assume we want this package; free-form + # comments allowed after a # + package=${line%%#*} inst_pkg=1 # Look for # dist:xxx in comment