aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-satisfydepends-experimental
diff options
context:
space:
mode:
authorlool <lool>2006-12-09 14:53:16 +0000
committerlool <lool>2006-12-09 14:53:16 +0000
commit23b6d8ccbf9203ae1cb6091858b3298338396f23 (patch)
treec6280b32dd764f1d40506b842941cb036d014a5f /pbuilder-satisfydepends-experimental
parenta2959c33e3d729f3c0dc526dee3291b37a08a3ae (diff)
downloadpbuilder-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-xpbuilder-satisfydepends-experimental4
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"