* Kristine Daniels <[EMAIL PROTECTED]> [2005-11-12 00:48]:
> As per the /usr/share/doc/examples I am attempting
> $ cdrdao read-cd --datafile foo.cdr foo.toc
> $ jack -f $PWD/data.toc
> (The full path to the .toc file is required for jack to find the
> data file)

The full path shouldn't be required, but I see what's going on here.
jack will parse this data.toc file, then create a ~/tmp/jack/jack-<id>
directory, and change into that directory; then it tries to read the
.toc file again and fails.  A patch for this is below.  I'll look into
the main problem raised in this bug report a little bit later.

Arne, please apply.



% jack -f data.toc
Traceback (most recent call last):
  File "/usr/bin/jack", line 108, in ?
    is_submittable, track1_offset = jack_prepare.read_toc_file()
  File "/usr/lib/python2.3/site-packages/jack_prepare.py", line 192, in 
read_toc_file
    jack_ripstuff.all_tracks, new_image_file, track1_offset = 
jack_functions.cdrdao_gettoc(cf['_toc_file'])
  File "/usr/lib/python2.3/site-packages/jack_functions.py", line 340, in 
cdrdao_gettoc
    toc = real_cdrdao_gettoc(tocfile)
  File "/usr/lib/python2.3/site-packages/jack_functions.py", line 239, in 
real_cdrdao_gettoc
    f = open(tocfile, "r")
IOError: [Errno 2] No such file or directory: 'data.toc'


diff -urN jack-3.1.1~/jack_functions.py jack-3.1.1/jack_functions.py
--- jack-3.1.1~/jack_functions.py       2005-11-12 12:16:08.000000000 +0000
+++ jack-3.1.1/jack_functions.py        2005-11-12 12:16:20.000000000 +0000
@@ -236,7 +236,12 @@
     "returns TOC object, needs name of toc-file to read"
     toc = jack_TOC.TOC()
 
-    f = open(tocfile, "r")
+    if not os.path.exists(tocfile):
+        error("Can't open TOC file '%s': file does not exist." % 
os.path.abspath(tocfile))
+    try:
+        f = open(tocfile, "r")
+    except (IOError, OSError), e:
+        error("Can't open TOC file '%s': %s" % (os.path.abspath(tocfile), e))
 
     tocpath, tocfiledummy = os.path.split(tocfile)
 
diff -urN jack-3.1.1~/jack_prepare.py jack-3.1.1/jack_prepare.py
--- jack-3.1.1~/jack_prepare.py 2005-11-12 12:16:08.000000000 +0000
+++ jack-3.1.1/jack_prepare.py  2005-11-12 12:16:18.000000000 +0000
@@ -152,6 +152,8 @@
         if not cf['_multi_mode']:
             if not os.path.exists(cf['_toc_file']):
                 jack_functions.cdrdao_puttoc(cf['_toc_file'], 
jack_ripstuff.all_tracks, jack_freedb.freedb_id(jack_ripstuff.all_tracks))
+                # from now on, we no longer care about the original image toc 
file
+                cf['_image_toc_file'] = cf['_toc_file']
                 jack_freedb.freedb_template(jack_ripstuff.all_tracks) # 
generate freedb form if tocfile is created
             if not os.path.exists(cf['_freedb_form_file']):
                 jack_freedb.freedb_template(jack_ripstuff.all_tracks)

-- 
Martin Michlmayr
http://www.cyrius.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to