summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:59:20 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:59:20 +0000
commit185091b7a965f476e4b190791bce3d280ad5de6c (patch)
tree295c08fa090c4993e08c1b59d3f171a1cac3bc5d /cmdline
parent70e86a21fca74075b869b1d6fe4463ec5a3ceab7 (diff)
Print out a message when doing regexing, change regex c...
Author: jgg Date: 2002-07-08 04:09:52 GMT Print out a message when doing regexing, change regex charset.
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 9708fb077..b4d832df3 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-get.cc,v 1.120 2002/04/27 04:28:04 jgg Exp $
+// $Id: apt-get.cc,v 1.121 2002/07/08 04:09:52 jgg Exp $
/* ######################################################################
apt-get - Cover for dpkg
@@ -1340,7 +1340,8 @@ bool DoInstall(CommandLine &CmdL)
// Check if the name is a regex
const char *I;
for (I = S; *I != 0; I++)
- if (*I == '.' || *I == '?' || *I == '*' || *I == '|')
+ if (*I == '?' || *I == '*' || *I == '|' ||
+ *I == '[' || *I == '^' || *I == '$')
break;
if (*I == 0)
return _error->Error(_("Couldn't find package %s"),S);
@@ -1354,7 +1355,7 @@ bool DoInstall(CommandLine &CmdL)
if ((Res = regcomp(&Pattern,S,REG_EXTENDED | REG_ICASE |
REG_NOSUB)) != 0)
{
- char Error[300];
+ char Error[300];
regerror(Res,&Pattern,Error,sizeof(Error));
return _error->Error(_("Regex compilation error - %s"),Error);
}
@@ -1366,6 +1367,9 @@ bool DoInstall(CommandLine &CmdL)
if (regexec(&Pattern,Pkg.Name(),0,0,0) != 0)
continue;
+ ioprintf(c1out,_("Note, selecting %s for regex '%s'\n"),
+ Pkg.Name(),S);
+
if (VerTag != 0)
if (TryToChangeVer(Pkg,Cache,VerTag,VerIsRel) == false)
return false;