summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:02:17 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:02:17 +0000
commit8d99802677287a86759232898199db40add923fd (patch)
tree0400c072ec776447c63311e3f7ed3fb5b4460afa
parent602daf93c858dcd3a01cce78323d07d2b379a03c (diff)
* Give a warning if an illegal type abbreviation is use...
Author: mdz Date: 2003-07-25 20:45:13 GMT * Give a warning if an illegal type abbreviation is used when looking up a configuration item (Closes: #168453)
-rw-r--r--apt-pkg/contrib/configuration.cc20
-rw-r--r--debian/changelog2
2 files changed, 14 insertions, 8 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index b0d705b07..56eb374c6 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: configuration.cc,v 1.25 2002/11/09 19:52:03 doogie Exp $
+// $Id: configuration.cc,v 1.26 2003/07/25 20:45:13 mdz Exp $
/* ######################################################################
Configuration Class
@@ -383,13 +383,17 @@ bool Configuration::ExistsAny(const char *Name) const
{
string key = Name;
- if (key.size() > 2 && key.end()[-2] == '/' &&
- key.find_first_of("fdbi",key.size()-1) < key.size())
- {
- key.resize(key.size() - 2);
- if (Exists(key.c_str()))
- return true;
- }
+ if (key.size() > 2 && key.end()[-2] == '/')
+ if (key.find_first_of("fdbi",key.size()-1) < key.size())
+ {
+ key.resize(key.size() - 2);
+ if (Exists(key.c_str()))
+ return true;
+ }
+ else
+ {
+ _error->Warning("Unrecognized type abbreviation: '%c'", key.end()[-3]);
+ }
return Exists(Name);
}
diff --git a/debian/changelog b/debian/changelog
index becccbfff..1a6b6fa8b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ apt (0.5.8) unstable; urgency=low
* Clarify the meaning of the only-source option in apt-get(8) (Closes: #177258)
* Updated French man pages from Philippe Batailler
<philippe.batailler@free.fr> (Closes: #182194)
+ * Give a warning if an illegal type abbreviation is used when looking up a
+ configuration item (Closes: #168453)
--