]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
* cmdline/apt-get.cc:
[apt.git] / cmdline / apt-get.cc
index 974427f510aaab57ebc5fceda704b006e1f8b4f3..82257a06e203df7b8861704db2dab5ad47a32412 100644 (file)
@@ -1519,8 +1519,9 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix,
 
    // build regexp for the task
    char S[300];
-   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;
@@ -2116,24 +2117,32 @@ bool DoSource(CommandLine &CmdL)
       
       string srec = Last->AsStr();
       string::size_type pos = srec.find("\nVcs-");
-      if (pos != string::npos )
+      while (pos != string::npos)
       {
         pos += strlen("\nVcs-");
         string vcs = srec.substr(pos,srec.find(":",pos)-pos);
+        if(vcs == "Browser") 
+        {
+           pos = srec.find("\nVcs-", pos);
+           continue;
+        }
         pos += vcs.length()+2;
         string::size_type epos = srec.find("\n", pos);
         string uri = srec.substr(pos,epos-pos).c_str();
         ioprintf(c1out, _("WARNING: '%s' is maintained in "
                           "the '%s' version control system at:\n"
-                          "'%s'\n"),
+                          "%s\n"),
                  Src.c_str(), vcs.c_str(), uri.c_str());
         if(vcs == "Bzr") 
-           ioprintf(c1out,_("Please use: 'bzr get %s'\n"
+           ioprintf(c1out,_("Please use:\n"
+                            "bzr get %s\n"
                             "to modify the package.\n"),
                     uri.c_str());
         ioprintf(c1out, "Are you sure you want to continue [yN]? ");
         if(!YnPrompt(false))
            return _error->Error(_("Abort."));
+        else 
+           break;
       }
 
       // Back track