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

Re: 16 Broken packages because of tar



Em Qui, 2004-02-12 às 21:24, Marc 'HE' Brockschmidt escreveu:
> Martin Michlmayr <tbm@cyrius.com> writes:
> > In particular, can it be done in Python?
> 
> I've no idea if a fitting tar lib is available for Python. My script is
> just a thin layer over Archive::Tar to get the needed information.
> 
> I attached the thing: It reads the gunzipped data.tar.gz from STDIN and
> outputs the broken (from dpkg's POV) filenames (filename exactly 100
> chars long, not terminated with \0) on STDOUT. Something like 
> if [[ $( ar p $DEB data.tar.gz | gzip -dc | deb_tar_check.pl ) ]]; then echo $DEB broken; fi
> should do the job.

See these Python modules (descriptions and links taken from Python
Library Reference):
zlib [0]    -- Compression compatible with gzip
gzip [1]    -- Support for gzip files
bz2 [2]     -- Compression compatible with bzip2
tarfile [3] -- Read and write tar archive files

Links:
0 - http://www.python.org/doc/2.3.3/lib/module-zlib.html
1 - http://www.python.org/doc/2.3.3/lib/module-gzip.html
2 - http://www.python.org/doc/2.3.3/lib/module-bz2.html
3 - http://www.python.org/doc/2.3.3/lib/module-tarfile.html

	Cheers,
		Felipe Almeida Lessa.



Reply to: