From 5d3dba6bc84c748906277346c119d116ac56073b Mon Sep 17 00:00:00 2001 From: Loïc Minier Date: Tue, 5 Jan 2010 16:30:45 +0100 Subject: Fix get_dep_op_and_ver() output Fix get_dep_op_and_ver() to not output anything when there is no version and to deal with spaces between version and closing parenthesis. --- pbuilder-satisfydepends-classic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pbuilder-satisfydepends-classic') diff --git a/pbuilder-satisfydepends-classic b/pbuilder-satisfydepends-classic index 6742d4a..56f1abd 100755 --- a/pbuilder-satisfydepends-classic +++ b/pbuilder-satisfydepends-classic @@ -51,7 +51,7 @@ get_pkg_name() { # filter operator and version of a "/" escaped versioned build-dep; e.g. # "foo/(>=/2)" becomes ">= 2" get_dep_op_and_ver() { - echo "$*" | tr "/" " " | sed 's/^.*( *\(<<\|<=\|>=\|=\|<\|>>\|>\) *\(.*\)).*$/\1 \2/' + echo "$*" | sed -n 's#/# #g; s/.*( *\(<<\|<=\|>=\|=\|<\|>>\|>\) *\([^ )]*\) *).*/\1 \2/p' } # call apt-get in chroot in simulate mode -- cgit v1.2.3