Choosing image to burn (Data CD) - Multiple errors/bugs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cdcontrol (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: cdcontrol
The cdcontrol package has a number of flaws in the implementation of the menu for choosing an image to burn when trying to burn a data CD. This causes several errors:
- In a directory with an uneven number of files listed, the program errors out with "Canceled by user"
- Files with spaces are interpreted as two files
- Files are in two columns (the tag of dialog --menu) and so are unselectable
- All files are listed and are able to selected (not just .iso/image files)
Information:
-------
OS:
Description: Ubuntu 8.04.1
Release: 8.04
cdcontrol:
Package: cdcontrol
State: installed
Automatically installed: yes
Version: 1.90-1.1
Priority: extra
Section: universe/utils
Maintainer: Ubuntu MOTU Developers <email address hidden>
Uncompressed Size: 197k
Depends: bash (>= 2.0), cdrecord (>= 1.9.1-1), dialog (>= 0.9), bc, dc, cdda2wav, procmail
Proposed fix
-------------------
My fix / patch would fix the bugs listed above, and it would make the menu show the file size next to the file name (showing only iso files)
The attached file is the only file needing to be changed. Simply copy the file to overwrite /var/lib/
Changes (old file to new): control- chars ${IMG_DIR} | sed -e s/"\.iso@"/"\.iso"/ | \
< `ls -F ${IMG_DIR} | grep -v '/' | sed -e s/"^"/"\""/ | \
< sed -e s/"\.iso$"/'\.iso\" \"\" \\ '/` 2>${L_TMPFILE}
---
> `ls -Fsh --show-
> sed -e s/"\.iso@"/"\.iso"/ | \
> while read c1 c2; do c2="$(printf '%-20s\n' "$c2")"; echo "$c2 $c1"; done | \
> grep -v " 0$" | grep -v '/' | grep ".iso"` 2>${L_TMPFILE}