From 23b6d8ccbf9203ae1cb6091858b3298338396f23 Mon Sep 17 00:00:00 2001 From: lool Date: Sat, 9 Dec 2006 14:53:16 +0000 Subject: * pbuilder-satisfydepends-experimental: small optimization: move COMPARESTRING and DEPSVERSION computation out of the per-version loop; quote COMPARESTRING properly. --- pbuilder-satisfydepends-experimental | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pbuilder-satisfydepends-experimental') diff --git a/pbuilder-satisfydepends-experimental b/pbuilder-satisfydepends-experimental index 633acf7..d0cf38e 100755 --- a/pbuilder-satisfydepends-experimental +++ b/pbuilder-satisfydepends-experimental @@ -115,9 +115,9 @@ function versioneddep_to_aptcmd () { CANDIDATE_VERSION="$( candidate_version "$PACKAGE" )" # try the candidate version, then all available versions (asc) + COMPARESTRING="$(echo "$INSTALLPKG" | tr "/" " " | sed 's/^.*([ ]*\(<<\|<=\|>=\|=\|<\|>>\|>\)[ ]*\(.*\)).*$/\1/')" + DEPSVERSION="$(echo "$INSTALLPKG" | tr "/" " " | sed 's/^.*([ ]*\(<<\|<=\|>=\|=\|<\|>>\|>\)[ ]*\(.*\)).*$/\2/')" for VERSION in $CANDIDATE_VERSION $PACKAGEVERSIONS; do - COMPARESTRING=$(echo "$INSTALLPKG" | tr "/" " " | sed 's/^.*([ ]*\(<<\|<=\|>=\|=\|<\|>>\|>\)[ ]*\(.*\)).*$/\1/') - DEPSVERSION="$(echo "$INSTALLPKG" | tr "/" " " | sed 's/^.*([ ]*\(<<\|<=\|>=\|=\|<\|>>\|>\)[ ]*\(.*\)).*$/\2/')" if dpkg --compare-versions "$VERSION" "$COMPARESTRING" "$DEPSVERSION"; then if [ $VERSION != $CANDIDATE_VERSION ]; then PACKAGE_WITHVERSION="$PACKAGE=$VERSION" -- cgit v1.2.3