dep3 parser/generator for git-buildpackage
Thomas Koch
thomas at koch.ro
Mon Jan 21 11:01:36 UTC 2013
Hi,
I wrote a dep3 parser / generator to enhance the patch queue handling of git-
buildpackage. The module (and a test module) currently lives here:
https://github.com/thkoch2001/python-
debian/blob/thkoch/dep3_patch/lib/debian/dep3_patch.py
I intend to prepare some commits to git-buildpackage including the module
there first to let it mature and later include it in python-debian. In git-
buildpackage I'd rewrite / delete some code related to git-pq to let it use
the new module.
My motivation for writing this was that the git-buildpackage version in
unstable did not preserve the dep3 header fields during an import-export
cycle.
The dep3 module does not intend to retain a patch header verbatim. It would be
a huge effort to do so with little benefit. After a parse-format cycle the
following will have changed:
- The formatter outputs the fields in a fixed order regardless of the original
order.
- The formatter outputs the description fields always as continuation fields
with one space indentation. It does parse but not generate unindented
description lines.
- The formatter outputs field names in lowercase regardless of the original
case.
The module does not support dpatch, only quilt.
I'm aware of the deb822 module in python-debian but it is rather hard to
understand, provides more than needed and might fail to parse unindented
description lines.
I intend that gbp-pq would create commit messages that conform to the dep3
specification i.e. I can use the parser to parse the patch header as well as
the commit message.
Is this OK with you, Guido, Markus? I'm relatively new to python and
appreciate any review.
Regards,
Thomas Koch, http://www.koch.ro
More information about the pkg-python-debian-discuss
mailing list