Quellcode durchsuchen

* apt-pkg/aptconfiguration.cc:
- show a deprecation notice for APT::Acquire::Translation

David Kalnischkies vor 16 Jahren
Ursprung
Commit
9f9717fa6b
2 geänderte Dateien mit 7 neuen und 1 gelöschten Zeilen
  1. 4 0
      apt-pkg/aptconfiguration.cc
  2. 3 1
      debian/changelog

+ 4 - 0
apt-pkg/aptconfiguration.cc

@@ -10,6 +10,7 @@
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
+#include <apt-pkg/error.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/macros.h>
 #include <apt-pkg/macros.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
@@ -196,6 +197,9 @@ std::vector<std::string> const Configuration::getLanguages(bool const &All,
 	// it was undocumented and so it should be not very widthly used
 	// it was undocumented and so it should be not very widthly used
 	string const oldAcquire = _config->Find("APT::Acquire::Translation","");
 	string const oldAcquire = _config->Find("APT::Acquire::Translation","");
 	if (oldAcquire.empty() == false && oldAcquire != "environment") {
 	if (oldAcquire.empty() == false && oldAcquire != "environment") {
+		// TRANSLATORS: the two %s are APT configuration options
+		_error->Notice("Option '%s' is deprecated. Please use '%s' instead, see 'man 5 apt.conf' for details.",
+				"APT::Acquire::Translation", "Acquire::Languages");
 		if (oldAcquire != "none")
 		if (oldAcquire != "none")
 			codes.push_back(oldAcquire);
 			codes.push_back(oldAcquire);
 		codes.push_back("en");
 		codes.push_back("en");

+ 3 - 1
debian/changelog

@@ -20,8 +20,10 @@ apt (0.7.26~exp8) UNRELEASED; urgency=low
     - complete rewrite but use the same API
     - complete rewrite but use the same API
     - add NOTICE and DEBUG as new types of a message
     - add NOTICE and DEBUG as new types of a message
     - add a simple stack handling to be able to delay error handling
     - add a simple stack handling to be able to delay error handling
+  * apt-pkg/aptconfiguration.cc:
+    - show a deprecation notice for APT::Acquire::Translation
 
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Fri, 25 Jun 2010 19:15:21 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com>  Sat, 26 Jun 2010 09:01:40 +0200
 
 
 apt (0.7.26~exp7) experimental; urgency=low
 apt (0.7.26~exp7) experimental; urgency=low