Bug#744243: python-apt: please support build profiles
Package: python-apt
Version: 0.9.3.5
Severity: wishlist
Tags: patch
Hi,
since apt 0.9.16.1, there is support for build profiles in apt:
https://wiki.debian.org/BuildProfileSpec
Please also let python-apt support build profiles because dak uses
python-apt and needs to support build profiles. The following patch
should work:
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc
index 644827c..243d9f9 100644
--- a/python/apt_pkgmodule.cc
+++ b/python/apt_pkgmodule.cc
@@ -156,8 +156,8 @@ static const char *parse_src_depends_doc =
"If 'strip_multi_arch' is True, :any (and potentially other special values)\n"
"will be stripped from the full package name";
static PyObject *RealParseDepends(PyObject *Self,PyObject *Args,
- bool ParseArchFlags, std::string name,
- bool debStyle=false)
+ bool ParseArchFlags, bool ParseRestrictionsList,
+ std::string name, bool debStyle=false)
{
std::string Package;
std::string Version;
@@ -180,7 +180,7 @@ static PyObject *RealParseDepends(PyObject *Self,PyObject *Args,
break;
Start = debListParser::ParseDepends(Start,Stop,Package,Version,Op,
- ParseArchFlags, StripMultiArch);
+ ParseArchFlags, StripMultiArch, ParseRestrictionsList)
if (Start == 0)
{
PyErr_SetString(PyExc_ValueError,"Problem Parsing Dependency");
@@ -213,11 +213,11 @@ static PyObject *RealParseDepends(PyObject *Self,PyObject *Args,
}
static PyObject *ParseDepends(PyObject *Self,PyObject *Args)
{
- return RealParseDepends(Self, Args, false, "parse_depends");
+ return RealParseDepends(Self, Args, false, false, "parse_depends");
}
static PyObject *ParseSrcDepends(PyObject *Self,PyObject *Args)
{
- return RealParseDepends(Self, Args, true, "parse_src_depends");
+ return RealParseDepends(Self, Args, true, true, "parse_src_depends");
}
/*}}}*/
// md5sum - Compute the md5sum of a file or string /*{{{*/
You probably also have to bump the libapt version.
cheers, josch
Reply to: