Package: jack / 3.1.1+cvs20050801-31

18_warn_no_base_dir.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Add a warning if base_dir is not set.  Maybe Debian-specific, but I think
it doesn't hurt it put this in upstream.  Also, we definitely need this
check_rc function for a later patch.


diff -urN jack-3.1.1~/jack jack-3.1.1/jack
--- jack-3.1.1~/jack	2006-01-11 13:31:39.000000000 +0000
+++ jack-3.1.1/jack	2006-01-11 13:48:44.000000000 +0000
@@ -84,6 +84,7 @@
 debug("user_cf: " + `user_cf`)
 debug("argv_cf: " + `argv_cf`)
 
+jack_checkopts.check_rc(global_cf, user_cf, argv_cf)
 jack_checkopts.consistency_check(cf)
 
 if cf['save_args']['val'] == 1:
diff -urN jack-3.1.1~/jack_checkopts.py jack-3.1.1/jack_checkopts.py
--- jack-3.1.1~/jack_checkopts.py	2006-01-11 13:31:39.000000000 +0000
+++ jack-3.1.1/jack_checkopts.py	2006-01-11 13:48:23.000000000 +0000
@@ -215,3 +215,13 @@
 
     if cf['_dont_work'] and cf['_query_when_ready']:
         warning("you want to use --query-now / -Q instead of --query / -q")
+
+# Checks concerning options specified by the user (in the global or user rc
+# files or the command line), i.e. options/values that are not the default
+# jack options from jack_config.
+def check_rc(global_cf, user_cf, argv_cf):
+
+    all_keys = global_cf.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.")
+