Package: dh-debputy
Version: 0.1.88

Upgrading from dh-debputy 0.1.87, I noticed a warning (sorry for the
German):

,----
| Vorbereitung zum Entpacken von .../dh-debputy_0.1.88_all.deb ...
| Entpacken von dh-debputy (0.1.88) über (0.1.87) ...
| Vorbereitung zum Entpacken von .../libteckit0_2.5.13+ds-2_amd64.deb ...
| dh-debputy (0.1.88) wird eingerichtet ...
| /usr/share/dh-debputy/debputy/plugins/debputy/metadata_detectors.py:118: 
SyntaxWarning: invalid escape sequence '\-'
|   if systemd-tmpfiles --help | grep -q "\-\-purge"; then
`----

I think the following patch should fix this, but it is completely
untested.

diff --git a/src/debputy/plugins/debputy/metadata_detectors.py b/src/debputy/plugins/debputy/metadata_detectors.py
index 9c1fa9e2..80cb4aa5 100644
--- a/src/debputy/plugins/debputy/metadata_detectors.py
+++ b/src/debputy/plugins/debputy/metadata_detectors.py
@@ -115,7 +115,7 @@ def detect_systemd_tmpfiles(
         TMPFILES_CONTENT=tmpfiles_content,
     )
     purge_snippet = textwrap.dedent("""\
-            if systemd-tmpfiles --help | grep -q "\-\-purge"; then
+            if systemd-tmpfiles --help | grep -q -e "--purge"; then
                     systemd-tmpfiles ${{DPKG_ROOT:+--root="$DPKG_ROOT"}} --purge - >/dev/null <<TMPFILES_EOF || true
         {TMPFILES_CONTENT}
         TMPFILES_EOF

-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)

Reply via email to