summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2007-07-14 13:02:52 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2007-07-14 13:02:52 -0300
commit29925560efccf3f5801a122f6061e2cf2046c955 (patch)
treeef59a50db5c46eeff6338db285e158bfe01f2b64 /cmdline
parent4ac3c092c5c59476ec1ed34a93dffecdf816fae5 (diff)
parente53ee4caf5ecf882e3df2665a8e1c2a9e6da6fb0 (diff)
Merge fixes branch.
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index aa54677be..95600ff6d 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1519,9 +1519,9 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix,
// build regexp for the task
char S[300];
- // better: "^Task:.*[^a-z]lamp-server([^a-z]|\n)" ?
- snprintf(S, sizeof(S), "^Task:.*[^a-z]%s[^a-z].*$", taskname);
- regcomp(&Pattern,S, REG_EXTENDED | REG_NOSUB | REG_NEWLINE);
+ snprintf(S, sizeof(S), "^Task:.*[, ]%s([, ]|$)", taskname);
+ if(regcomp(&Pattern,S, REG_EXTENDED | REG_NOSUB | REG_NEWLINE) != 0)
+ return _error->Error("Failed to compile task regexp");
bool found = false;
bool res = true;