here’s a small summary of the 5th (coding) week. Last week I spent
most of my time with working on the cpio module. Finally I ended
up with a complete rewrite of osc’s “old” cpio module. The
cpio implementation details are taken from the cpio 2.11 package.
Currently only the “new ascii” format is supported and we can
only handle regular files (this is sufficient for our needs). Here’s
a small example how to use it:
# cpio_open is just a convenience method for CpioArchive(filename=fname)
with cpio_open(fname) as archive:
for archive_file in archive:
# print filename
# print contents
It’s also possible to pass a file-like object to a CpioArchive
instance (in this case we do not need to use the with statement).
Also it can be “easily” enhanced to support different cpio formats
(one just have to write the specific ArchiveReader and ArchiveWriter
classes:) ). The code is available at  and the testcases at .
Todo for this week:
* finish the build module
* start with working on the package fetching code
Both comments and pings are currently closed.