aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rwxr-xr-xpbuilder-satisfydepends-experimental4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b2111e..6db9af2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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"