From 63e82e5cd287aaba948c19f788ca02f87b3ce7ae Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 13 Jul 2014 01:46:08 +0200 Subject: [PATCH] Replace custom templating system with Python format() in patchupdate.py. --- debian/tools/patchupdate.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/debian/tools/patchupdate.py b/debian/tools/patchupdate.py index 4f9421e4..de9671d2 100755 --- a/debian/tools/patchupdate.py +++ b/debian/tools/patchupdate.py @@ -270,11 +270,11 @@ Wine to run common Windows applications under Linux. These patches fix the following Wine bugs: -@@bugs@@ +{bugs} Besides that the following additional changes are included: -@@fixes@@ +{fixes} ## Compiling wine-compholio @@ -286,14 +286,14 @@ details. Make sure to install all required wine dependencies before proceeding. As the first step please grab the latest Wine source: ```bash -wget http://prdownloads.sourceforge.net/wine/wine-@@version@@.tar.bz2 -wget https://github.com/compholio/wine-compholio-daily/archive/v@@version@@.tar.gz +wget http://prdownloads.sourceforge.net/wine/wine-{version}.tar.bz2 +wget https://github.com/compholio/wine-compholio-daily/archive/v{version}.tar.gz ``` Extract the archives: ```bash tar xvjf wine-1*.tar.bz2 cd wine-1* -tar xvzf ../v@@version@@.tar.gz --strip-components 1 +tar xvzf ../v{version}.tar.gz --strip-components 1 ``` And apply the patches: ```bash @@ -346,11 +346,7 @@ def generate_readme(patches, fp): if distro.lower() == "unreleased": continue return version - template = README_template - template = template.replace("@@bugs@@", _enum(_all_bugs())) - template = template.replace("@@fixes@@", _enum(_all_fixes())) - template = template.replace("@@version@@", _latest_stable_version()) - fp.write(template) + fp.write(README_template.format(bugs=_enum(_all_bugs()), fixes=_enum(_all_fixes()), version=_latest_stable_version())) if __name__ == "__main__": patches = read_patchsets("./patches")