summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2015-05-07 17:28:07 +0200
committerMichael Vogt <mvo@ubuntu.com>2015-05-07 17:28:07 +0200
commit196cbd31da61751edbf7a55f4fc0e900a7b51bd6 (patch)
treececf7848b0e686f25fbad5d2dad2fee217fbaa8d
parente03ec63ce07e597c6f29edc5121a24f874cf6aaa (diff)
downloadpython-apt-196cbd31da61751edbf7a55f4fc0e900a7b51bd6.tar.gz
Add MULTI_ARCH_NO constant and deprecate MULTI_ARCH_NONE
Thanks to Johannes Schauer closes: #782802
-rw-r--r--doc/source/library/apt_pkg.rst2
-rw-r--r--python/apt_pkgmodule.cc4
2 files changed, 4 insertions, 2 deletions
diff --git a/doc/source/library/apt_pkg.rst b/doc/source/library/apt_pkg.rst
index d6ffaf4c..c5e58b38 100644
--- a/doc/source/library/apt_pkg.rst
+++ b/doc/source/library/apt_pkg.rst
@@ -916,7 +916,7 @@ Example:
The multi-arch state of the package. Can be one of the following
attributes.
- .. attribute:: MULTI_ARCH_NONE
+ .. attribute:: MULTI_ARCH_NO
No multi-arch
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc
index 0d84f468..32bc440a 100644
--- a/python/apt_pkgmodule.cc
+++ b/python/apt_pkgmodule.cc
@@ -910,7 +910,9 @@ extern "C" void initapt_pkg()
PyDict_SetItemString(PyPackageManager_Type.tp_dict, "RESULT_INCOMPLETE",
MkPyNumber(pkgPackageManager::Incomplete));
-
+ PyDict_SetItemString(PyVersion_Type.tp_dict, "MULTI_ARCH_NO",
+ MkPyNumber(pkgCache::Version::None));
+ // NONE is deprecated (#782802)
PyDict_SetItemString(PyVersion_Type.tp_dict, "MULTI_ARCH_NONE",
MkPyNumber(pkgCache::Version::None));
PyDict_SetItemString(PyVersion_Type.tp_dict, "MULTI_ARCH_ALL",