From 0301a239d667e42f0f4e6b21bbdae0a50386282b Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 23 Nov 2014 19:45:14 +0100 Subject: [PATCH] patchupdate.py: Fix escaping of some special characters. --- debian/tools/patchupdate.py | 6 +++--- patches/Makefile | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/debian/tools/patchupdate.py b/debian/tools/patchupdate.py index 68ae60e7..77367e45 100755 --- a/debian/tools/patchupdate.py +++ b/debian/tools/patchupdate.py @@ -78,13 +78,13 @@ def _pairs(a): def _unique(iterable, key=None): "List unique elements, preserving order. Remember only the element just seen." - # unique_justseen('AAAABBBCCDAABBB') --> A B C D A B - # unique_justseen('ABBCcAD', str.lower) --> A B C A D + # _unique('AAAABBBCCDAABBB') --> A B C D A B + # _unique('ABBCcAD', str.lower) --> A B C A D return itertools.imap(next, itertools.imap(operator.itemgetter(1), itertools.groupby(iterable, key))) def _escape(s): """Escape string inside of '...' quotes.""" - return s.replace("\\", "\\\\").replace("\"", "\\\"").replace("'", "'\\''") + return s.replace("\\", "\\\\\\\\").replace("\"", "\\\"").replace("'", "'\\''") def _load_dict(filename): """Load a Python dictionary object from a file.""" diff --git a/patches/Makefile b/patches/Makefile index 3a5d487b..c0a2435d 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -491,8 +491,8 @@ gdi32-MultiMonitor.ok: $(call APPLY_FILE,gdi32-MultiMonitor/0002-winex11-Make-GetMonitorInfo-give-a-different-device-.patch) $(call APPLY_FILE,gdi32-MultiMonitor/0003-user32-Implement-EnumDisplayDevicesW-based-on-EnumDi.patch) @( \ - echo '+ { "Ken Thomases", "gdi32: Also accept \"\\\\.\\DISPLAY\" devices names with other than 1 as display devices.", 1 },'; \ - echo '+ { "Ken Thomases", "winex11: Make GetMonitorInfo() give a different device name (\\.\\DISPLAY) to each monitor.", 1 },'; \ + echo '+ { "Ken Thomases", "gdi32: Also accept \"\\\\\\\\.\\\\DISPLAY\" devices names with other than 1 as display devices.", 1 },'; \ + echo '+ { "Ken Thomases", "winex11: Make GetMonitorInfo() give a different device name (\\\\.\\\\DISPLAY) to each monitor.", 1 },'; \ echo '+ { "Ken Thomases", "user32: Implement EnumDisplayDevicesW() based on EnumDisplayMonitors() and GetMonitorInfoW().", 1 },'; \ ) > gdi32-MultiMonitor.ok @@ -1540,7 +1540,7 @@ user32-WndProc.ok: wine.inf-ProductId.ok: $(call APPLY_FILE,wine.inf-ProductId/0001-wine.inf-Add-fake-ProductId-to-HKLM-CurrentVersionNT.patch) @( \ - echo '+ { "Yanis Lukes", "wine.inf: Add fake ProductId to HKLM\\CurrentVersionNT.", 1 },'; \ + echo '+ { "Yanis Lukes", "wine.inf: Add fake ProductId to HKLM\\\\CurrentVersionNT.", 1 },'; \ ) > wine.inf-ProductId.ok # Patchset wineboot-HKEY_DYN_DATA @@ -1555,7 +1555,7 @@ wine.inf-ProductId.ok: wineboot-HKEY_DYN_DATA.ok: $(call APPLY_FILE,wineboot-HKEY_DYN_DATA/0001-wineboot-Add-some-generic-hardware-in-HKEY_DYN_DATA-.patch) @( \ - echo '+ { "Michael Müller", "wineboot: Add some generic hardware in HKEY_DYN_DATA\\Config Manager\\Enum.", 1 },'; \ + echo '+ { "Michael Müller", "wineboot: Add some generic hardware in HKEY_DYN_DATA\\\\Config Manager\\\\Enum.", 1 },'; \ ) > wineboot-HKEY_DYN_DATA.ok # Patchset winebuild-LinkerVersion