diff options
author | bubulle@debian.org <> | 2007-07-15 08:17:44 +0200 |
---|---|---|
committer | bubulle@debian.org <> | 2007-07-15 08:17:44 +0200 |
commit | 5ffd03998b01c174298ddb3f2f914f59bdee7481 (patch) | |
tree | 053148d6cef4f862101f30de584cae0bb5048757 /cmdline | |
parent | d59821362ed1032920a72d3795176cccadaea6b0 (diff) | |
parent | 82d0afc286514bbe8904c3436bb6580aeaa6ad66 (diff) |
Sync with Michael
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 6 |
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; |