diff options
author | lool <lool> | 2006-12-09 14:53:16 +0000 |
---|---|---|
committer | lool <lool> | 2006-12-09 14:53:16 +0000 |
commit | 23b6d8ccbf9203ae1cb6091858b3298338396f23 (patch) | |
tree | c6280b32dd764f1d40506b842941cb036d014a5f /pbuilder-satisfydepends-experimental | |
parent | a2959c33e3d729f3c0dc526dee3291b37a08a3ae (diff) | |
download | pbuilder-23b6d8ccbf9203ae1cb6091858b3298338396f23.tar pbuilder-23b6d8ccbf9203ae1cb6091858b3298338396f23.tar.gz |
* pbuilder-satisfydepends-experimental: small optimization: move
COMPARESTRING and DEPSVERSION computation out of the per-version loop;
quote COMPARESTRING properly.
Diffstat (limited to 'pbuilder-satisfydepends-experimental')
-rwxr-xr-x | pbuilder-satisfydepends-experimental | 4 |
1 files changed, 2 insertions, 2 deletions
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" |