diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | pbuilder-satisfydepends-experimental | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2006-12-09 + + * pbuilder-satisfydepends-experimental: small optimization: move + COMPARESTRING and DEPSVERSION computation out of the per-version loop; + quote COMPARESTRING properly. + 2006-11-14 Loic Minier <lool@dooz.org> * testsuite/regression/run-test-satisfy-depends.sh: log error 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" |