From f984b80e11c576bf883910d0ce92c746b7e03bae Mon Sep 17 00:00:00 2001 From: "Lucas C. Villa Real" Date: Mon, 2 Jan 2017 22:35:07 -0200 Subject: Improve DEB dependency processing. --- Functions/DEB | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Functions/DEB b/Functions/DEB index f2cebec..1c0e498 100644 --- a/Functions/DEB +++ b/Functions/DEB @@ -28,7 +28,13 @@ function thirdparty_distribution() { function thirdparty_dependencies() { local debfile="$1" - dpkg-deb --field "$debfile" "Depends" + local deps=$(dpkg-deb --field "$debfile" "Depends") + + # The Depends fields contains a comma-separated list of dependencies. The range with the required + # versions, when available, is output between parenthesis. To make the Dependencies output match the + # format used by GoboLinux, we use a newline separator and remove all parenthesis characters found. + + echo "$deps" | sed 's/, /\n/g' | tr -d "()" } function thirdparty_description() { -- cgit v1.1