diff mbox

UBUNTU: [Packaging] Fix 'printchanges' to work with versions containing '+'

Message ID 1406739431-26783-1-git-send-email-dann.frazier@canonical.com
State New
Headers show

Commit Message

dann frazier July 30, 2014, 4:57 p.m. UTC
I maintain several topic kernel branches/builds where I like to use version
strings that contain a '+' character. Today this means I can't use targets
like printchanges and insertchanges because '+' characters aren't escaped.

Signed-off-by: dann frazier <dann.frazier@canonical.com>
---
 debian/rules.d/1-maintainer.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

dann frazier July 30, 2014, 5:03 p.m. UTC | #1
On Wed, Jul 30, 2014 at 10:57 AM, dann frazier
<dann.frazier@canonical.com> wrote:
> I maintain several topic kernel branches/builds where I like to use version
> strings that contain a '+' character. Today this means I can't use targets
> like printchanges and insertchanges because '+' characters aren't escaped.

Oh, and I'd find this useful for both utopic and trusty, though I do
understand if it
doesn't meet the SRU requirements.

  -dann

> Signed-off-by: dann frazier <dann.frazier@canonical.com>
> ---
>  debian/rules.d/1-maintainer.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
> index bc2e458..f7a0092 100644
> --- a/debian/rules.d/1-maintainer.mk
> +++ b/debian/rules.d/1-maintainer.mk
> @@ -97,7 +97,7 @@ printenv:
>
>  printchanges:
>         @baseCommit=$$(git log --pretty=format:'%H %s' | \
> -               gawk '/UBUNTU: '".*Ubuntu-$(prev_fullver)"'$$/ { print $$1; exit }'); \
> +               gawk '/UBUNTU: '".*Ubuntu-`echo $(prev_fullver) | sed 's/+/\\\\+/'`"'$$/ { print $$1; exit }'); \
>                 git log "$$baseCommit"..HEAD | \
>                 perl -w -f $(DROOT)/scripts/misc/git-ubuntu-log $(ubuntu_log_opts)
>
> --
> 2.0.1
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Tim Gardner July 31, 2014, 12:42 p.m. UTC | #2

diff mbox

Patch

diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
index bc2e458..f7a0092 100644
--- a/debian/rules.d/1-maintainer.mk
+++ b/debian/rules.d/1-maintainer.mk
@@ -97,7 +97,7 @@  printenv:
 
 printchanges:
 	@baseCommit=$$(git log --pretty=format:'%H %s' | \
-		gawk '/UBUNTU: '".*Ubuntu-$(prev_fullver)"'$$/ { print $$1; exit }'); \
+		gawk '/UBUNTU: '".*Ubuntu-`echo $(prev_fullver) | sed 's/+/\\\\+/'`"'$$/ { print $$1; exit }'); \
 		git log "$$baseCommit"..HEAD | \
 		perl -w -f $(DROOT)/scripts/misc/git-ubuntu-log $(ubuntu_log_opts)