From ab04fa68f216974b277c708ab0788ef8798f879f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 19 Sep 2006 15:41:52 +0200 Subject: * cmdline/apt-get.cc: - install with FixBroken=true --- cmdline/apt-get.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cmdline/apt-get.cc') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 9705f84dc..57e0e9ec7 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1434,7 +1434,7 @@ bool DoInstallTask(CommandLine &CmdL) // build regexp for the task char S[300]; - snprintf(S, sizeof(S), "^Task:.*%s.*\n", *I); + snprintf(S, sizeof(S), "^Task:.*[^a-z]%s[^a-z].*\n", *I); regcomp(&Pattern,S, REG_EXTENDED | REG_NOSUB | REG_NEWLINE); for (Pkg = Cache->PkgBegin(); Pkg.end() == false; Pkg++) @@ -1448,14 +1448,13 @@ bool DoInstallTask(CommandLine &CmdL) buf[end-start] = 0x0; if (regexec(&Pattern,buf,0,0,0) != 0) continue; - TryToInstall(Pkg,Cache,Fix,false,false,ExpectedInst); + TryToInstall(Pkg,Cache,Fix,false,true,ExpectedInst); } } // Call the scored problem resolver Fix.InstallProtect(); - if (Fix.Resolve(true) == false) - _error->Discard(); + Fix.Resolve(true); // prompt for install return InstallPackages(Cache,false,true); -- cgit v1.2.3 From d6df222d8edb3e38401affcee2a4e5eba605da32 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 19 Sep 2006 16:06:06 +0200 Subject: * cmdline/apt-get.cc: - call regexp_free() --- cmdline/apt-get.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmdline/apt-get.cc') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 57e0e9ec7..2062aaa16 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1423,14 +1423,12 @@ bool DoInstallTask(CommandLine &CmdL) pkgRecords Recs(Cache); unsigned int ExpectedInst = 0; - unsigned int Packages = 0; pkgProblemResolver Fix(Cache); char buf[64*1024]; for (const char **I = CmdL.FileList + 1; *I != 0; I++) { regex_t Pattern; - int Res; // build regexp for the task char S[300]; @@ -1450,6 +1448,8 @@ bool DoInstallTask(CommandLine &CmdL) continue; TryToInstall(Pkg,Cache,Fix,false,true,ExpectedInst); } + + regfree(&Pattern); } // Call the scored problem resolver -- cgit v1.2.3