From: David Kalnischkies Date: Sat, 24 Apr 2010 10:44:11 +0000 (+0200) Subject: * apt-pkg/contrib/configuration.cc: X-Git-Tag: 0.8.0~9^2~58^2~2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/c3a3a1b1b68706df40dc022bdcdf8ede684f5956 * apt-pkg/contrib/configuration.cc: - error out if #clear directive has no argument --- diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 7588b041c..9129d92f0 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -773,6 +773,8 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool const &AsSectio else return _error->Error(_("Syntax error %s:%u: Unsupported directive '%s'"),FName.c_str(),CurLine,Tag.c_str()); } + else if (Tag.empty() == true && NoWord == false && Word == "#clear") + return _error->Error(_("Syntax error %s:%u: clear directive requires an option tree as argument"),FName.c_str(),CurLine); else { // Set the item in the configuration class diff --git a/debian/changelog b/debian/changelog index f78f80936..ee2be291b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,6 +34,8 @@ apt (0.7.26~exp4) experimental; urgency=low - correct typos in german apt_preferences manpage, thanks Chris Leick! * apt-pkg/sourcelist.cc: - be less strict and accept [option=value] as well + * apt-pkg/contrib/configuration.cc: + - error out if #clear directive has no argument [ Jari Aalto ] * cmdline/apt-get.cc: