From 185091b7a965f476e4b190791bce3d280ad5de6c Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:59:20 +0000 Subject: 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. --- cmdline/apt-get.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'cmdline') 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; -- cgit v1.2.3