diff mbox

[RFC,2/2] UBUNTU: lucid: parameterise base version search string

Message ID 1298360193.534946.174023301587.2.gpush@pororo
State New
Headers show

Commit Message

Jeremy Kerr Feb. 22, 2011, 7:36 a.m. UTC
For OEM branches, we may have different version numbering in the release
commit messages. In this case, the current method of finding baseCommit
does not work, so printchanges can't find the correct set of commits to
generate the changelog.

This change parameterises the search string use to find baseCommit,
allowing it to be overridden by a branch-specific variable. If no
variable is provided, we default to the current string.

Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>

---
 debian/rules.d/1-maintainer.mk |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
index 65b9688..a513b7a 100644
--- a/debian/rules.d/1-maintainer.mk
+++ b/debian/rules.d/1-maintainer.mk
@@ -106,9 +106,11 @@  endif
 	@echo "do_full_source            = $(do_full_source)"
 	@echo "do_tools                  = $(do_tools)"
 
+baseCommitRegex ?= UBUNTU: .*Ubuntu-$(release)-$(prev_revision)$$
+
 printchanges:
 	@baseCommit=$$(git log --pretty=format:'%H %s' | \
-		awk '/UBUNTU: '".*Ubuntu-$(release)-$(prev_revision)"'$$/ { print $$1; exit }'); \
+		awk '/$(baseCommitRegex)/ { print $$1; exit }'); \
 		git log "$$baseCommit"..HEAD | \
 		perl -w -f $(DROOT)/scripts/misc/git-ubuntu-log $(ubuntu_log_opts)