[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#671784: python-apt: debExtractControl gone



On Sun, May 06, 2012 at 11:56:37PM +0200, Ansgar Burchardt wrote:
> Package: python-apt
> Version: 0.8.4
> Severity: normal
> 
> debExtractControl is gone from apt_inst.  The example still mention
> deb_extract_control, but that is not there either:
> 
> -----
> % python /usr/share/doc/python-apt/examples/dpkg-info.py 
> Traceback (most recent call last):
>   File "/usr/share/doc/python-apt/examples/dpkg-info.py", line 5, in <module>
>     from apt_inst import deb_extract_control
> ImportError: cannot import name deb_extract_control
> -----
> 
> Is this method gone and something else should be used instead? Or should
> deb_extract_control still be there?  In the latter case, please consider making
> debExtractControl an alias for it so dak can work in both stable and wheezy.

It's gone. The documentation [1] clearly says so. Use:

	DebFile("package.deb").control.extractdata("control")

instead. Those object-oriented replacements were introduced in squeeze,
and the other ones deprecated, and removed (or actually, disabled) for
the wheezy release.

But the example is broken, yes.

[1] http://apt.alioth.debian.org/python-apt-doc/library/apt_inst.html#module-apt_inst
    (also in python-apt-doc)

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.



Reply to: