[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#511195: cdrw-taper: MEDIABLOCKS set in config file is overwritten by taperlib.pm version (700MB CD)



Package: cdrw-taper
Version: 0.4-1
Severity: important
Tags: patch


MEDIABLOCKS variable set in config file is overwritten by taperlib.pm version
(which is specifiing 700MB CD)

BLOCKSIZE is also overwritted, but I don't assume someone really wants to
modify it ... also, there are places in taperlib.pm which forgots to use it
and assumes 2048 like line "$self->{capacity} = $2 * 2; # in kilobytes!"

diff -Naur taperlib.pm taperlib.pm
--- taperlib.pm 2006-05-20 16:09:39.000000000 +0200
+++ taperlib.pm 2009-01-08 12:27:17.000000000 +0100
@@ -117,6 +117,14 @@
 # Regexp for CD-RW devices
 $CD_DEVICE_RE =
"^/dev/(ide|scsi)/host\\d/bus\\d/target\\d/lun\\d/(cd|generic):";;
 
+# Blocksize of output media in bytes (2k for CD-RW)
+$BLOCKSIZE = 2048;
+
+# Blocks per media (CDRW: 650 MB = 650 * 1024k / 2k = 332800)
+$MEDIABLOCKS = 358400;
+# Blocks per media (DVD[-+]RW: 4700 MB = 4700 * 1000 * 1000 / 2k = 2294921)
+# $MEDIABLOCKS = 2294921;
+
 require "/etc/cdrw-taper.conf";
 
 # Original taper binary
@@ -126,14 +134,6 @@
 ## No user editable settings below here
 ##
 
-# Blocksize of output media in bytes (2k for CD-RW)
-$BLOCKSIZE = 2048;
-
-# Blocks per media (CDRW: 650 MB = 650 * 1024k / 2k = 332800)
-$MEDIABLOCKS = 358400;
-# Blocks per media (DVD[-+]RW: 4700 MB = 4700 * 1000 * 1000 / 2k = 2294921)
-# $MEDIABLOCKS = 2294921;
-
 # "Export" config variables
 our ($CONFIG_ROOT, $DUMP_DIR, $DELETE_DIRS, $WRITE_NON_ERASABLE,
$CD_DEVICE_RE,
      $TAPER_ORIG, $BLOCKSIZE);


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages cdrw-taper depends on:
ii  amanda-server              1:2.5.1p1-2.1 Advanced Maryland Automatic Networ
ii  cdrecord                   9:1.1.2-1     Dummy transition package for wodim
ii  mkisofs                    9:1.1.2-1     Dummy transition package for genis
ii  perl-base                  5.8.8-7etch6  The Pathologically Eclectic Rubbis

cdrw-taper recommends no packages.

-- debconf-show failed



Reply to: