diff options
author | Loïc Minier <lool@dooz.org> | 2010-01-05 16:30:45 +0100 |
---|---|---|
committer | Loïc Minier <lool@dooz.org> | 2010-01-05 16:30:45 +0100 |
commit | 5d3dba6bc84c748906277346c119d116ac56073b (patch) | |
tree | 5a6efa9bb3eaecd8a7e148ea27b779ab7ea4ca86 /pbuilder-satisfydepends-classic | |
parent | c143dc085c7fa6da810f5c205086ebcc8f2a9395 (diff) | |
download | pbuilder-5d3dba6bc84c748906277346c119d116ac56073b.tar pbuilder-5d3dba6bc84c748906277346c119d116ac56073b.tar.gz |
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.
Diffstat (limited to 'pbuilder-satisfydepends-classic')
-rwxr-xr-x | pbuilder-satisfydepends-classic | 2 |
1 files changed, 1 insertions, 1 deletions
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 |