gsrc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gsrc-commit] /srv/bzr/gsrc/trunk r2297: fix printf choking on percent s


From: Brandon Invergo
Subject: [Gsrc-commit] /srv/bzr/gsrc/trunk r2297: fix printf choking on percent signs
Date: Sat, 13 Apr 2013 10:41:59 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 2297
committer: Brandon Invergo <address@hidden>
branch nick: trunk
timestamp: Sat 2013-04-13 10:41:59 +0200
message:
  fix printf choking on percent signs
modified:
  ChangeLog
  gar.mk
=== modified file 'ChangeLog'
--- a/ChangeLog 2013-04-12 20:44:21 +0000
+++ b/ChangeLog 2013-04-13 08:41:59 +0000
@@ -1,3 +1,12 @@
+2013-04-13  Brandon Invergo  <address@hidden>
+
+       * gar.mk (pkg-info): Handle URLs and BLURBS that might have "%"
+       symbols, which causes printf to throw an error
+       (pkg-rec): Handle URLs and BLURBS that might have "%" symbols,
+       which causes printf to throw an error
+       (fetch-list): Handle URLs that might have "%" symbols, which
+       causes printf to throw an error
+
 2013-04-12  Brandon Invergo  <address@hidden>
 
        * GNUmakefile.am (package-list.html): Add target to build an HTML

=== modified file 'gar.mk'
--- a/gar.mk    2013-04-12 20:41:17 +0000
+++ b/gar.mk    2013-04-13 08:41:59 +0000
@@ -132,9 +132,9 @@
 pkg-info:
        @printf "$(MSG)Name:$(OFF)        $(NAME)\n"
        @printf "$(MSG)Version:$(OFF)     $(GARVERSION)$(if 
$(PATCHNUM),-$(PATCHNUM))\n"
-       @printf "$(MSG)URL:$(OFF)         $(HOME_URL)\n"
+       @printf "$(MSG)URL:$(OFF)         $(subst %,%%,$(HOME_URL))\n"
        @printf "$(MSG)Description:$(OFF)\n"
-       @printf '$(if $(BLURB),$(subst $(newline),\n,$(BLURB)), 
$(DESCRIPTION))\n'
+       @printf '$(if $(BLURB),$(subst %,%%,$(subst $(newline),\n,$(BLURB))), 
$(DESCRIPTION))\n'
        @($(MAKE) install-p >/dev/null 2>/dev/null && \
                printf "$(MSG)Status$(OFF):      installed (stowed)\n") || \
                ($(MAKE) reinstall-p >/dev/null 2>/dev/null && \
@@ -152,10 +152,10 @@
        @printf "Name: $(NAME)\n"
        @printf "Upstream_name: $(UPSTREAMNAME)\n"
        @printf "Version: $(GARVERSION)\n"
-       @printf "Home_URL: $(HOME_URL)\n"
-       @printf "Download_URL: $(firstword $(MASTER_SITES))$(MASTER_SUBDIR)\n"
+       @printf "Home_URL: $(subst %,%%,$(HOME_URL))\n"
+       @printf "Download_URL: $(subst %,%%,$(firstword 
$(MASTER_SITES))$(MASTER_SUBDIR))\n"
        @printf "Description: $(DESCRIPTION)\n"
-       @printf 'Blurb: $(subst $(newline),\n+ ,$(BLURB))\n'
+       @printf 'Blurb: $(subst %,%%,$(subst $(newline),\n+ ,$(BLURB)))\n'
        @printf "Directory: $(shell basename `dirname $(shell pwd)`)\n"
        @for i in $(BUILDDEPS); do printf "Build_dep: $$i\n"; done
        @for i in $(LIBDEPS); do printf "Lib_dep: $$i\n"; done
@@ -166,7 +166,7 @@
 fetch-list:
        @printf "$(MSG)Name:$(OFF)     $(GARNAME)\n"
        @printf "$(MSG)Version:$(OFF)  $(GARVERSION)\n"
-       @printf "$(MSG)Location:$(OFF) $(firstword 
$(MASTER_SITES))$(MASTER_SUBDIR)\n"
+       @printf "$(MSG)Location:$(OFF) $(subst %,%%,$(firstword 
$(MASTER_SITES))$(MASTER_SUBDIR))\n"
        @printf "$(MSG)Distribution files:$(OFF)\n"
        @for i in $(DISTFILES); do printf "          $$i\n"; done
        @printf "$(MSG)Patch files:$(OFF)\n"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]