Your message dated Sun, 13 Nov 2005 16:17:09 -0800
with message-id <[EMAIL PROTECTED]>
and subject line Bug#338621: fixed in jack 3.1.1-11
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 11 Nov 2005 15:34:35 +0000
>From [EMAIL PROTECTED] Fri Nov 11 07:34:35 2005
Return-path: <[EMAIL PROTECTED]>
Received: from sorrow.cyrius.com ([65.19.161.204])
        by spohr.debian.org with esmtp (Exim 4.50)
        id 1EaavC-0000xN-T1
        for [EMAIL PROTECTED]; Fri, 11 Nov 2005 07:34:34 -0800
Received: by sorrow.cyrius.com (Postfix, from userid 10)
        id DB05F64D54; Fri, 11 Nov 2005 15:34:33 +0000 (UTC)
Received: by derision.cyrius.com (Postfix, from userid 1000)
        id E412F2B41D; Fri, 11 Nov 2005 15:34:23 +0000 (GMT)
Date: Fri, 11 Nov 2005 15:34:22 +0000
From: Martin Michlmayr <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: jack assumes that all hashes (#) are comments
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Reportbug-Version: 3.17
X-Debbugs-Cc: Arne Zellentin <[EMAIL PROTECTED]>
User-Agent: Mutt/1.5.11
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-11.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
        X_DEBBUGS_CC autolearn=ham version=2.60-bugs.debian.org_2005_01_02

Package: jack
Version: 3.1.1-10
Severity: normal
Tags: patch

jacker's parser for its configuration files assumes that every hash (#)
starts a comment.  However, a hash can also be embedded in a variable,
for example in:
    unusable_chars:[' ', '#', '/'] # comment
Unfortunately, this leads to:
This is jack 3.1.1 (C)2004 Arne Zellentin <[EMAIL PROTECTED]>
Traceback (most recent call last):
  File "/usr/bin/jack", line 74, in ?
    user_cf = jack_rc.load(cf, cf['user_rc']['val'])
  File "/usr/lib/python2.3/site-packages/jack_rc.py", line 94, in load
    ret, val = jack_argv.parse_option(cf, i[0:2], 0, i[0], None, 
origin="rcfile")
  File "/usr/lib/python2.3/site-packages/jack_argv.py", line 145, in 
parse_option
    l = eval(data)
  File "<string>", line 1
    [' ', '
         ^
SyntaxError: EOL while scanning single-quoted string


Below is a patch which makes the parsing routing much more robust and deals
with hashes in variables.



--- jack_rc.py~ 2005-11-11 15:20:08.000000000 +0000
+++ jack_rc.py  2005-11-11 15:31:48.000000000 +0000
@@ -32,39 +32,43 @@
 
 def read(file):
     read_rc = []
-
     try:
         f = open(file)
-    except:
+    except (IOError, OSError):
         return read_rc
-
     lineno = 0
-    while 1:
-        x = f.readline()
+    for x in f.readlines():
+        lineno += 1
+        x = x.strip()
         if not x:
-            break
+            continue
         opt = val = com = None
-        lineno = lineno + 1
-
-        x = string.strip(x)
-        x = string.split(x, "#", 1)
-        if len(x) > 1:
-            opt, com = x
+        if x.startswith("#"):
+            com = x[1:].lstrip()
         else:
-            opt = x[0]
-        if opt and com:
-            opt = string.strip(opt)
-        if opt:
-            x = string.split(opt, ":", 1)
-            if len(x) > 1:
-                opt, val = x
-            else:
+            x = [i.strip() for i in x.split(":", 1)]
+            if len(x) < 2:
                 opt = x[0]
-        else:
-            opt = None
+            else:
+                opt, val = x
+                # check if there's a comment ridden in val
+                if "#" in val:
+                    quoted = []
+                    for i in range(len(val)):
+                        c = val[i]
+                        if c in ('"', "'") and (not i or val[i-1] != "\\"):
+                            if quoted and quoted[-1] == c:
+                                quoted.pop()
+                            else:
+                                quoted.append(c)
+                        elif c == "#" and not quoted:
+                            val, com = val[:i].strip(), val[i:].strip()
+                            break
         read_rc.append([opt, val, com, lineno])
     version = get_version(read_rc)
-    if version != jack_version.prog_rcversion:
+    if not version:
+        warning("config file %s doesn't define jackrc-version." % file)
+    elif version != jack_version.prog_rcversion:
         warning("config file %s is of unknown version %s." % (file, `version`))
     return read_rc
 
@@ -80,10 +84,9 @@
             return None
         if vers[0] != "jackrc-version":
             return None
-        ver = int(vers[1])
-        return ver
-    else:
-        return None
+        if vers[1].isdigit():
+            return int(vers[1])
+    return None
 
 def load(cf, file):
     rc = read(expand(file))




-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-powerpc
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages jack depends on:
ii  cdda2wav                  4:2.01+01a03-2 Creates WAV files from audio CDs
ii  cdparanoia                3a9.8-11       An audio extraction tool for sampl
ii  flac                      1.1.2-3        Free Lossless Audio Codec - comman
ii  python                    2.3.5-3        An interactive high-level object-o
ii  python-cddb               1.4-4          Python interface to CD-IDs and Fre
ii  python-eyed3              0.6.8-1        Python module for id3-tags manipul
ii  python-flac               0.0.4-1        Free Lossless Audio Codec [Python 
ii  python-pyvorbis           1.3-1          A Python interface to the Ogg Vorb
ii  vorbis-tools              1.0.1-1.5      Several Ogg Vorbis Tools

jack recommends no packages.

-- no debconf information

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

---------------------------------------
Received: (at 338621-close) by bugs.debian.org; 14 Nov 2005 00:24:51 +0000
>From [EMAIL PROTECTED] Sun Nov 13 16:24:51 2005
Return-path: <[EMAIL PROTECTED]>
Received: from katie by spohr.debian.org with local (Exim 4.50)
        id 1EbS21-0001EE-SJ; Sun, 13 Nov 2005 16:17:09 -0800
From: Martin Michlmayr <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.56 $
Subject: Bug#338621: fixed in jack 3.1.1-11
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Sun, 13 Nov 2005 16:17:09 -0800
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 2

Source: jack
Source-Version: 3.1.1-11

We believe that the bug you reported is fixed in the latest version of
jack, which is due to be installed in the Debian FTP archive:

jack_3.1.1-11.diff.gz
  to pool/main/j/jack/jack_3.1.1-11.diff.gz
jack_3.1.1-11.dsc
  to pool/main/j/jack/jack_3.1.1-11.dsc
jack_3.1.1-11_i386.deb
  to pool/main/j/jack/jack_3.1.1-11_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Martin Michlmayr <[EMAIL PROTECTED]> (supplier of updated jack package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 13 Nov 2005 22:04:23 +0000
Source: jack
Binary: jack
Architecture: source i386
Version: 3.1.1-11
Distribution: unstable
Urgency: low
Maintainer: Michael Banck <[EMAIL PROTECTED]>
Changed-By: Martin Michlmayr <[EMAIL PROTECTED]>
Description: 
 jack       - Rip and encode CDs with one command
Closes: 293334 338621 338697
Changes: 
 jack (3.1.1-11) unstable; urgency=low
 .
   [ Martin Michlmayr ]
   * debian/patches/11_choose_bitrate_quality.patch: Use fixed bitrate
     when a bitrate is given on the command line even when the config
     defaults to variable bitrate; closes: #293334.
   * debian/patches/10_vbr_default_man.patch: The default of --vbr
     has been "yes" for a while.
   * debian/patches/12_gogo_vbr-otf-cmd.patch: Fix gogo's vbr-otf-cmd
     to use the quality variable rather than a hardcoded value.
   * debian/patches/13_rc_hash.patch: Don't automatically assume that
     a hash (#) in the configuration file is a comment since it can
     also occur in the value of config variables; closes: #338621.
   * debian/patches/91_fix_cdrdao_image.patch: Fix support for cdrdao
     image files; closes: #338697.
   * debian/patches/14_tocfile_abspath.patch: Print a better warning
     when the cdrdao toc file cannot be found, and use the absolute
     path so the file will be found if it exists; see #338697.
   * debian/patches/15_imagefile_abspath.patch: If an image file is
     specified without a toc file, print a warning that the TOC will
     be obtained from the CD; also use the absolute path of the image
     file since we're about to change cwd; thanks to Kristine Daniels
     for the report, see #338697.
   * debian/copyright: Update the address of the FSF.
   * debian/fix-vorbis-tags.pl: Remove since the UTF-8 problems with OGG
     Vorbis tags were fixed a long time ago (jack 2.99.9-2, 2002-12-31).
   * debian/examples: Remove fix-vorbis-tags.pl.
   * debian/rules (binary-predeb/jack): Likewise.
   * debian/NEWS: Add all news entries from README.Debian.
   * debian/README.Debian: Remove empty file.
   * debian/patches-held: Remove obsolete patches.
Files: 
 76b66d44edd7d7f2136f308682856413 652 sound optional jack_3.1.1-11.dsc
 f47156fe3efc36756de7e0e150dcb9b3 42138 sound optional jack_3.1.1-11.diff.gz
 aecf4e6e0fc81d90c42d30a7a52e7641 122926 sound optional jack_3.1.1-11_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDd7j2Kb5dImj9VJ8RAi0hAKCUujznQqpOVDIFm5DbIpBzUbTI5ACghpRH
jO+cx+Q/EKeV1jPzBouW3qI=
=El+F
-----END PGP SIGNATURE-----


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

Reply via email to