summaryrefslogtreecommitdiff
path: root/debian/patches/50_check_ripper_encoder.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/50_check_ripper_encoder.patch')
-rw-r--r--debian/patches/50_check_ripper_encoder.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/50_check_ripper_encoder.patch b/debian/patches/50_check_ripper_encoder.patch
new file mode 100644
index 0000000..5e8b95b
--- /dev/null
+++ b/debian/patches/50_check_ripper_encoder.patch
@@ -0,0 +1,34 @@
+Check whether a command passed via --ripper/--encoder actually exists.
+
+
+Depends on 21_fallback_ripper.patch
+
+
+diff -urN jack-3.1.1+cvs20050801~/jack_checkopts.py jack-3.1.1+cvs20050801/jack_checkopts.py
+--- jack-3.1.1+cvs20050801~/jack_checkopts.py 2006-05-20 14:02:09.000000000 +0200
++++ jack-3.1.1+cvs20050801/jack_checkopts.py 2006-05-20 14:08:54.000000000 +0200
+@@ -228,6 +228,7 @@
+ def check_rc(cf, global_cf, user_cf, argv_cf):
+
+ all_keys = global_cf.keys() + user_cf.keys() + argv_cf.keys()
++ userdef_keys = user_cf.keys() + argv_cf.keys()
+ if 'base_dir' not in all_keys:
+ warning("You have no standard location set, putting files into the current directory. Please consider setting base_dir in ~/.jack3rc.")
+
+@@ -244,6 +245,15 @@
+ else:
+ error("No valid ripper found on your system.")
+
++ # Check whether ripper and encoder exist in $PATH. Skip the check if
++ # it's a plugin since we cannot assume the name of the plugin
++ # corresponds to the executable.
++ for t in ("ripper", "encoder"):
++ helper = cf[t]["val"]
++ if t in userdef_keys and not helper.startswith("plugin_"):
++ if not jack_utils.in_path(helper):
++ error("Helper %s '%s' not found on your system." % (t, helper))
++
+ # If the default CD device doesn't exist, see whether we can find another one
+ if ('cd_device' not in all_keys and cf["rip_from_device"]["val"] and
+ not os.path.exists(cf["cd_device"]["val"])):
+