Package: rpl Version: 1.5.7-1 Severity: normal Tags: patch upstream Dear Maintainer,
using rpl with the `--prompt` option causes rpl to fail with the following backtrace: $ rpl --prompt foo bar test_file Replacing "foo" with "bar" (case sensitive) (partial words matched) . Save 'test_file' ? ([Y]/N) Traceback (most recent call last): File "/usr/bin/rpl", line 314, in <module> main() File "/usr/bin/rpl", line 269, in main line = raw_input() NameError: name 'raw_input' is not defined It appears that Debian is using a hardcoded `/usr/bin/python3` shebang, whereas the script is using python2 features (`raw_input`). Patching to use the python3-equivalent `input` function where necessary ` appears to fix the issue: diff --git rpl usr/bin/rpl index 14754c3..fe2ff7c 100755 --- rpl +++ usr/bin/rpl @@ -5,12 +5,6 @@ try: import readline except ImportError: pass from stat import * -try: - raw_input -except NameError: - raw_input = input - - def show_license(*eat): print ("""rpl - replace strings in files Copyright (C) 2004-2005 Goran Weinholt <weinh...@debian.org> Thanks Luke -- System Information: Debian Release: buster/sid APT prefers oldstable-updates APT policy: (500, 'oldstable-updates'), (500, 'unstable'), (500, 'oldstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages rpl depends on: ii python3 3.6.3-1 rpl recommends no packages. rpl suggests no packages. -- no debconf information *** rpl.patch diff --git rpl usr/bin/rpl index 14754c3..fe2ff7c 100755 --- rpl +++ usr/bin/rpl @@ -5,12 +5,6 @@ try: import readline except ImportError: pass from stat import * -try: - raw_input -except NameError: - raw_input = input - - def show_license(*eat): print ("""rpl - replace strings in files Copyright (C) 2004-2005 Goran Weinholt <weinh...@debian.org>