diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2007-07-12 14:02:46 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2007-07-12 14:02:46 -0300 |
commit | a99e1914169e0dfb1367d5a04a4611ead9839d02 (patch) | |
tree | b3c0365b67bd6ddb72bad9ffed5ab99acdd08bd1 /cmdline | |
parent | 9a52beaad9a26454fe627dab3f87ebf08c799677 (diff) | |
parent | f03dd1e032139356f1e5b7f19fb76482ae05e311 (diff) |
Sync with Michael branch
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; |