aboutsummaryrefslogtreecommitdiff
path: root/HACKING
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-12-09 11:38:19 +0100
committerGuido Günther <agx@sigxcpu.org>2016-12-09 11:38:19 +0100
commitc86a141057b50a1a65bb6e6fc3e400a804e3f12d (patch)
tree8cb0ec96bd8824b362d9f028a1bcb0f3077ffb34 /HACKING
parent63009e5cbc62644204e7329471e13c46bb4cbbe1 (diff)
docs: document file layout and some interfaces
Gbp-Dch: Ignore
Diffstat (limited to 'HACKING')
-rw-r--r--HACKING31
1 files changed, 31 insertions, 0 deletions
diff --git a/HACKING b/HACKING
index bb90b0c..299de9a 100644
--- a/HACKING
+++ b/HACKING
@@ -27,3 +27,34 @@ mailing list or add it to a bug report against git-buildpackage on
http://bugs.debian.org/src:git-buildpackage
+
+Layout
+------
+
+ gbp/scripts/*.py - the actual gbp commands (buildpackage, dch, …)
+ gbp/scripts/common/ - code shared between Debian and RPM commands
+ gbp/deb/ - Debian package handling (control, dsc, …)
+ gbp/rpm/ - RPM package handling (spec files, …)
+ gbp/git/ - Git repository interaction
+ tests/*.py - unit tests
+ tests/doctests - doctests that also serve as examples
+ tests/component/ - component tests that invoke actual commands
+
+Interfaces
+----------
+A gbp command in gbp/scripts/<commmand>.py must provide these interfaces:
+
+When one invokes `gbp <command>` gbp/scripts/<commmand>.py is imported by
+
+ gbp/scripts/supercommand.py
+
+which then invokes it's *main* function with all given command line arguments.
+It is expected to return with the exit status that should be passed back to the
+shell.
+
+When one invokes `gbp config <command>` gbp/scripts/<commmand>.py is imported by
+
+ gbp/scripts/config.py
+
+which then invokes it's *build_parser* function with the command name as argument.
+It is expected to return a GbpConfigParser with all config files parsed.