On Wed, 06 Sep 2006 12:15:30 +0200, Sune Vuorela wrote:

> #0  0xa7878250 in strcpy () from /lib/tls/libc.so.6
> #1  0x08092f20 in scandrivers () at io.c:1219
> #2  0x0805031d in init (argc=1, argv=0xafacf4c4, nonrootmode=0xafacf424,
> altdevscan=0x80f27a0) at init.c:1011
> #3  0x0804ed7f in main (argc=1701052540, argv=0x6f727473) at main.c:384

scandrivers() does a "cdrecord driver=help 2>&1" and handles the
lines to parse_driver() which just filters out "Driver types:" and
takes the rest as actual drivers.
The new wodim binary outputs an informational paragraph before the
actual drivers which seems to break this parsing mechanism.

I guess the solution could be either to strip out the paragraph in
scandrivers() or to improve parse_driver().

The first approach could be realized by changing
  strcat(line," driver=help 2>&1");
to
  strcat(line," driver=help 2>&1 | tail -n +7");
but this works only as long as the output of wodim doesn't change.        

Another approach might be to change the line to something like
  strcat(line," driver=help 2>&1 | sed -n '/Driver types:/,//p'");

Implementing the last one leads to the next problem:


** (xcdroast:13401): WARNING **: Invalid readcd version -unknown- found.
        Expecting at least version 1.11a34
        Start xcdroast with the -n option to override (not recommended!)

Changing check_version_readcd() in io.c to use "strcat(line,"
-version 2>/dev/null | head -n 1");" fixes this problem.
(But that was already in your patch.)

But afterwards xcdroast segfaults:

#0  0xa787b250 in strcpy () from /lib/tls/libc.so.6
#1  0x08092b28 in scanblankmodes () at io.c:5794
#2  0x08050322 in init (argc=1, argv=0xafbe4ce4, nonrootmode=0xafbe4c44, 
    altdevscan=0x80f22a0) at init.c:1012
#3  0x0804ed7f in main (argc=1701052540, argv=0x6f727473) at main.c:384

Ok, so we need to change scanblankmodes() in io.c. Trying
strcat(line," blank=help 2>&1 | sed -n '/Blanking options:/,//p'");

Wow, now xcdroast starts again!

Alright, I've packaged these changes into
debian/patches//13_cdrecord_to_wodim.dpatch - cf. the attached patch.

Probably it's a good idea to change the dependecy from cdrecord to
wodim, too. Done in the patch.

gregor
-- 
 .''`.   http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4
 : :' :  debian: the universal operating system - http://www.debian.org/
 `. `'   member of https://www.vibe.at/ | how to reply: http://got.to/quote/
   `-    NP: Orquesta Chepin: Murmullo
diff -u xcdroast-0.98+0alpha15/debian/control 
xcdroast-0.98+0alpha15/debian/control
--- xcdroast-0.98+0alpha15/debian/control
+++ xcdroast-0.98+0alpha15/debian/control
@@ -7,7 +7,7 @@
 
 Package: xcdroast
 Architecture: any
-Depends: ${shlibs:Depends}, cdrecord (>= 4:2.0), mkisofs (>= 4:2.0), cdda2wav 
(>= 4:2.0), debconf (>= 0.2.26) | debconf-2.0
+Depends: ${shlibs:Depends}, wodim, mkisofs (>= 4:2.0), cdda2wav (>= 4:2.0), 
debconf (>= 0.2.26) | debconf-2.0
 Suggests: cdparanoia
 Description: X based CD-writer software
  X-CD-Roast is a full X based CD-Writer-program and is the successor of
diff -u xcdroast-0.98+0alpha15/debian/patches/00list 
xcdroast-0.98+0alpha15/debian/patches/00list
--- xcdroast-0.98+0alpha15/debian/patches/00list
+++ xcdroast-0.98+0alpha15/debian/patches/00list
@@ -12,0 +13 @@
+13_cdrecord_to_wodim
diff -u xcdroast-0.98+0alpha15/debian/changelog 
xcdroast-0.98+0alpha15/debian/changelog
--- xcdroast-0.98+0alpha15/debian/changelog
+++ xcdroast-0.98+0alpha15/debian/changelog
@@ -1,3 +1,11 @@
+xcdroast (0.98+0alpha15-8) unstable; urgency=medium
+
+  * Create patch 13_cdrecord_to_wodim to handle the differences
+    between cdrecord and wodim (closes: #386251).
+  * Urgency set to medium because #386251 has severity grave.
+
+ -- gregor herrmann <[EMAIL PROTECTED]>  Sat,  9 Sep 2006 16:09:18 +0200
+
 xcdroast (0.98+0alpha15-7) unstable; urgency=low
 
   * Cleaned upgrade paths only affecting oldstable. (Closes: #201104)
only in patch2:
unchanged:
--- xcdroast-0.98+0alpha15.orig/debian/patches/13_cdrecord_to_wodim.dpatch
+++ xcdroast-0.98+0alpha15/debian/patches/13_cdrecord_to_wodim.dpatch
@@ -0,0 +1,46 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 13_cdrecord_to_wodim.dpatch by  <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Changes for the cdrecord -> wodim transition.
+
[EMAIL PROTECTED]@
+diff -urNad xcdroast-0.98+0alpha15~/src/io.c xcdroast-0.98+0alpha15/src/io.c
+--- xcdroast-0.98+0alpha15~/src/io.c   2006-09-09 16:24:37.000000000 +0200
++++ xcdroast-0.98+0alpha15/src/io.c    2006-09-09 16:26:32.000000000 +0200
+@@ -1273,7 +1273,7 @@
+       drvcount = 0;
+ 
+       get_wrap_path_cdrecord(line);
+-      strcat(line," driver=help 2>&1");
++      strcat(line," driver=help 2>&1 | sed -n '/Driver types:/,//p'");
+ 
+       dodebug(1, "calling: %s\n", line);
+         if ((fpin = popen(line,"r")) == NULL) {
+@@ -5856,7 +5856,7 @@
+       drvcount = 0;
+ 
+       get_wrap_path_cdrecord(line);
+-      strcat(line," blank=help 2>&1");
++      strcat(line," blank=help 2>&1 | sed -n '/Blanking options:/,//p'");
+ 
+       dodebug(1, "calling: %s\n", line);
+ 
+@@ -9913,7 +9913,7 @@
+       } else {
+               get_wrap_path("CDRECORD",line);
+       }
+-      strcat(line," -version 2>/dev/null");
++      strcat(line," -version 2>&1");
+ 
+       dodebug(1, "calling: %s\n", line);
+         if ((fpin = popen(line,"r")) == NULL) {
+@@ -10137,7 +10137,7 @@
+ 
+       strcpy(ver,"");
+       get_wrap_path("READCD",line);
+-      strcat(line," -version 2>/dev/null");
++      strcat(line," -version 2>/dev/null | head -n 1");
+ 
+       dodebug(1, "calling: %s\n", line);
+         if ((fpin = popen(line,"r")) == NULL) {

Attachment: signature.asc
Description: Digital signature

Reply via email to