Hello, I've been working on a replacement of dpkg-source in Python for a while, and I just learned that there is apparently another implementation in progress. We should merge. I'm attaching all the code I have here (which is very alpha, but not too far from working), along with a design document.
* Support for arbitrary compression (.Z, .gz, .bz2) and archive types (.tar, .zip) * In non-native packages, the debian/ directory is just a tarball. This solves the problem of adding new binary files, etc. * The directory debian/patches is searched for patches to apply after the source is unpackaged. Patches can be xdeltas or just regular patches. * There will be an optional file patch-control.xml which specifies the dependencies among different patches, which upstream sources they apply to, and other attributes such as allowed fuzziness and patch levels (for text patches). * To support multiple upstream sources, there will be a new file debian/source-control.xml. It can specify things such as what directory name the various upstream sources unpack into, in order to recognize it.
#!/usr/bin/python # # ArchiveMachine # A class for handling archiving/unarchiving files # e.g. .tar.gz, .zip, .tar.bz2... # # Copyright 2002 Colin Walters <[EMAIL PROTECTED]> # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA

