[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.42-30-gaa772de

Andreas Beckmann debian at abeckmann.de
Thu Jan 19 22:38:02 UTC 2012


The following commit has been merged in the piatti branch:
commit 276e7d20e4879d4c916148b28e80728787c7e561
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sun Jan 15 11:03:32 2012 +0100

    support version number substitution in *.py
    
    - support __PIUPARTS_VERSION__ in piuparts-*.py
    - remove temporary files generated during install
    - put piuparts-report version into a html comment
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/Makefile b/Makefile
index c190762..a811f7d 100644
--- a/Makefile
+++ b/Makefile
@@ -39,13 +39,15 @@ install-conf:
 
 install:
 	install -d $(sbindir) 
-	echo $(version)
 	sed -e 's/__PIUPARTS_VERSION__/$(version)/g' piuparts.py > piuparts
 	install piuparts $(sbindir)/piuparts
+	rm piuparts
 
 	install -d $(sharedir)/piuparts
 	for file in piuparts-slave piuparts-master piuparts-report piuparts-analyze; do \
-	    install -m 0755 $$file.py $(sharedir)/piuparts/$$file ; done
+	    sed -e 's/__PIUPARTS_VERSION__/$(version)/g' $$file.py > $$file ; \
+	    install -m 0755 $$file $(sharedir)/piuparts/$$file ; \
+	    rm $$file ; done
 
 	install -d $(site26)/piupartslib
 	install -d $(site27)/piupartslib
diff --git a/debian/changelog b/debian/changelog
index 7cfcb99..2d75fbe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,7 +22,7 @@ piuparts (0.43) UNRELEASED; urgency=low
   * piuparts-report.py:
     - Reorder the list of known problem analyses and add a few new ones.
     - Correctly split + strip comma-separated lists.
-  * Makefile:
+  * Makefile: Support version number substitution in piuparts-*.py, too.
   * README.txt: Document piuparts.conf settings used by piatti.git scripts.
 
   [ Holger Levsen ]
diff --git a/piuparts-report.py b/piuparts-report.py
index c0ec65e..a90befa 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -49,6 +49,7 @@ CONFIG_FILE = "/etc/piuparts/piuparts.conf"
 HTML_HEADER = """
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+  <!-- Generated by piuparts-report __PIUPARTS_VERSION__ -->
   <title>
    $page_title
   </title>

-- 
piuparts git repository



More information about the Piuparts-commits mailing list