From 337c885e7dd531858c35b256d974989bac6463df Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 16 Apr 2009 20:06:14 +0200 Subject: * apt/*.py: Initial rename work for Bug#481061 A new module, apt.deprecation, is introduced containing functions and classes which assist in the deprecation. The apt_pkg extension gets a new attribute, _COMPAT_0_7 which can be set by defining COMPAT_0_7 at compile time (-DCOMPAT_0_7). The names are changed, and compatibility functions are enabled if bool(apt_pkg._COMPAT_0_7) == True, i.e. if the package has been built with backward compatibility fixes. This commit changes the apt and aptsources packages, the apt_pkg and apt_inst extensions will be the next renames. --- python/apt_pkgmodule.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'python') diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index 3beec747..a056b0bc 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -589,6 +589,12 @@ extern "C" void initapt_pkg() AddInt(Dict,"InstStateReInstReq",pkgCache::State::ReInstReq); AddInt(Dict,"InstStateHold",pkgCache::State::Hold); AddInt(Dict,"InstStateHoldReInstReq",pkgCache::State::HoldReInstReq); + + #ifdef COMPAT_0_7 + AddInt(Dict,"_COMPAT_0_7",1); + #else + AddInt(Dict,"_COMPAT_0_7",0); + #endif #if PY_MAJOR_VERSION >= 3 return Module; #endif -- cgit v1.2.3