diff options
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-cache.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-cdrom.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-config.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-extracttemplates.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-get.cc | 17 | ||||
-rw-r--r-- | cmdline/apt-sortpkgs.cc | 4 |
6 files changed, 19 insertions, 18 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index cc4c1559e..c0655da40 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1711,8 +1711,8 @@ bool GenCaches(CommandLine &Cmd) /* */ bool ShowHelp(CommandLine &Cmd) { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return true; diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 7434a7225..379a433ea 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -135,8 +135,8 @@ bool DoIdent(CommandLine &) /* */ int ShowHelp() { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index 34365dc2e..63fa0867c 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -67,8 +67,8 @@ bool DoDump(CommandLine &CmdL) /* */ int ShowHelp() { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc index c87b436ba..6d580cc28 100644 --- a/cmdline/apt-extracttemplates.cc +++ b/cmdline/apt-extracttemplates.cc @@ -222,8 +222,8 @@ bool DebFile::ParseInfo() /* */ int ShowHelp(void) { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index aa54677be..b216204d2 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1507,7 +1507,8 @@ bool DoUpgrade(CommandLine &CmdL) bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, bool BrokenFix, unsigned int& ExpectedInst, - const char *taskname) + const char *taskname, + bool Remove) { const char *start, *end; pkgCache::PkgIterator Pkg; @@ -1519,9 +1520,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; @@ -1536,7 +1537,7 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, buf[end-start] = 0x0; if (regexec(&Pattern,buf,0,0,0) != 0) continue; - res &= TryToInstall(Pkg,Cache,Fix,false,true,ExpectedInst); + res &= TryToInstall(Pkg,Cache,Fix,Remove,true,ExpectedInst); found = true; } @@ -1604,7 +1605,7 @@ bool DoInstall(CommandLine &CmdL) // tasks must always be confirmed ExpectedInst += 1000; // see if we can install it - TryInstallTask(Cache, Fix, BrokenFix, ExpectedInst, S); + TryInstallTask(Cache, Fix, BrokenFix, ExpectedInst, S, Remove); continue; } @@ -2581,8 +2582,8 @@ bool DoMoo(CommandLine &CmdL) /* */ bool ShowHelp(CommandLine &CmdL) { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) { diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index 8909c3826..7b2a74aed 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -141,8 +141,8 @@ bool DoIt(string InFile) /* */ int ShowHelp() { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; |