Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #99417

Re: Reading files from .ar / .deb archives

From Ben Finney <ben+python@benfinney.id.au>
Newsgroups comp.lang.python
Subject Re: Reading files from .ar / .deb archives
Date 2015-11-25 17:48 +1100
Message-ID <mailman.53.1448434161.20593.python-list@python.org> (permalink)
References <DUB407-EAS786B02B886DA8D5A3DD549B5060@phx.gbl>

Show all headers | View raw


Кисик Мурысик <kisik2010@live.ru> writes:

> Hello!
> I'm new to Python, so I decided to learn it

Congratulations! Python is a fine language to learn, and this is the
place to discuss general Python topics.

You may also want to join the ‘tutor’ forum
<URL:https://mail.python.org/mailman/listinfo/tutor>, which is
specifically focussed on collaborative mentoring of Python newcomers.

> and write simple apt alternative (apt is somewhat broken for me).
> But I can't decide - can I read just one file (/DEBIAN/control) from
> archive without unpacking it, or do I need to unpack? And what module
> I can use to handle .ar files? (I read in Wikipedia that .deb is just
> .ar archive with specific structure)

You're right. The ‘ar’ archive format was IIUC chosen by the early
Debian project because it is very simple.

Unfortunately it is not widely supported; there is no standard library
support in Python for ‘ar’ archives.

You can use the third-party ‘python-debian’ library for reading Debian
archive files <URL:https://pypi.python.org/pypi/python-debian/>.

-- 
 \     “I know when I'm going to die, because my birth certificate has |
  `\                               an expiration date.” —Steven Wright |
_o__)                                                                  |
Ben Finney

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Reading files from .ar / .deb archives Ben Finney <ben+python@benfinney.id.au> - 2015-11-25 17:48 +1100

csiph-web