python модули для работы с deb (есть ли такие вообще?)

Модератор: Модераторы разделов

Аватара пользователя
Stauffenberg
Сообщения: 2041
Статус: ☮ PEACE ☮
ОС: открытая и свободная

python модули для работы с deb

Сообщение Stauffenberg »

Всем привет

До этого работал с RPM базами данных и не знал проблем:

Код: Выделить всё

import rpm, sys
ts = rpm.TransactionSet()
file = ts.dbMatch('name', sys.argv[1])

for h in file:
     print "%s-%s-%s.%s" % (h['name'], h['version'], h['release'], h['arch'])


Сейчас надо реализовать нечто подобное, но для Debian.

Какой модуль нужен для доступа к deb и... если такой вообще?
Гугл говорит, что было нечто известное как python-dpkg, но на странце проекта линк никуда меня не привел :unsure:
Labor omnia vincit

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” (Brian Kernighan)
Спасибо сказали:
Аватара пользователя
Portnov
Модератор
Сообщения: 1786
Статус: Матёрый линуксоид
ОС: Debian testing/unstable

Re: python модули для работы с deb

Сообщение Portnov »

Код: Выделить всё

python-apt - Python interface to libapt-pkg

Ы?
Работа: Ubuntu 9.10
Дом: Debian testing/unstable и на всякий случай winxp в virtualbox.
Для разнообразия: моя домашняя страница -http://iportnov.ru
Спасибо сказали:
neol
Сообщения: 600
ОС: Debian Stable

Re: python модули для работы с deb

Сообщение neol »

Код: Выделить всё

Пакет: python-debian
Описание: Python modules to work with Debian-related data formats
 This package provides Python modules that abstract many formats of Debian related files. Currently handled are:
 * Debtags information (debian.debtags module)
 * debian/changelog (debian.changelog module)
 * Packages files, pdiffs (debian.debian_support module)
 * Control files of single or multiple RFC822-style paragraphs, e.g. debian/control, .changes, .dsc, Packages, Sources, Release, etc. (debian.deb822 module)
 * Raw .deb and .ar files, with (read-only) access to contained files and meta-information
Спасибо сказали: