summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS6
-rw-r--r--src/ob-gencontrol.sh13
2 files changed, 17 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 9667742..1c75821 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,12 @@ Released: ????-??-??
"Now winterized to prevent freezing in December!"
+Utilities:
+
+ * ob-gencontrol now strips newlines from "Build-Depends" fields
+ instead of generating invalid control files. All spacing of
+ dependency control fields is now normalized using ob_parse_dep().
+
libopkbuild:
* ob_iso8601_gmtime() and ob_touch_t_gmtime() no longer trigger an
diff --git a/src/ob-gencontrol.sh b/src/ob-gencontrol.sh
index 5a8aa40..1c0da12 100644
--- a/src/ob-gencontrol.sh
+++ b/src/ob-gencontrol.sh
@@ -67,6 +67,8 @@ gen_control_src()
local binary=
local name=
local value=
+ local deps=
+ local dep=
local homepage=
binary="src:${OPK_SOURCE}"
@@ -91,8 +93,15 @@ gen_control_src()
if [ -z "${value}" ]; then
continue
fi
- value="$(ob_substvars "${value}")"
- printf '%s: %s\n' "${name}" "${value}" | sed 's/[, ]*$//' >&3
+ deps=''
+ IFS=','
+ for dep in ${value}; do
+ unset IFS
+ deps="${deps}$(ob_parse_dep "${dep}"), "
+ done
+ unset IFS
+ value="$(ob_substvars "${deps}")"
+ printf '%s: %s\n' "${name}" "${deps}" | sed 's/[, ]*$//' >&3
done
cat >&3 <<-EOF