Crash on folder name with spaces

Bug #838720 reported by Sylvain Dansereau
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
iso-scan (Debian)
Fix Released
Unknown
iso-scan (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When installing oneiric alpha 3 with the hd-media image, the iso-scan udeb is searching for an iso on a disk but if a folder name contains spaces, (ie: Documents and Settings) an error occurs and the search stops.

my setup:
booting from usb disk /dev/sdb1 on system with one local disk and one usb disk

/dev/sda1 (Win 7)
/dev/sda2 (/boot)
/dev/sda3 (lvm)
/dev/sda4 (lvm)
/dev/sdb1 (install image with preseed)

I am not sure of the correct way to fix this but I find that changing line number 162 of the var/lib/dpkg/info/iso-scan.postinst file
from
isolist=$(find $dir $opt -name "*.iso" -o -name "*.ISO" 2>/dev/null)
to
isolist=$(find "$dir" $opt -name "*.iso" -o -name "*.ISO" 2>/dev/null)
fixes the problem on my system

The installer boot image I am using is from
archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-amd64/current/images/hd-media/
and as of today, the udeb.list file says that the package version of iso-scan is 1.35ubuntu1

Note that this is my first bug report so I am not sure how to create a proper patch attachment
Thanks, Sylvain

Revision history for this message
Sérgio Faria (sergio91pt) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

To create a patch look here[1] or you can always use diff -u. However I don't know where you should apply the patch. I took a look at debian's iso-scan and seems to me it also suffers from similar unquoted $dir's.
[1]: https://wiki.ubuntu.com/PackagingGuide/Complete#Authoring_a_patch

Changed in iso-scan (Ubuntu):
status: New → Confirmed
Revision history for this message
Sylvain Dansereau (blinker73) wrote :

This is the result of a diff command between iso-scan.postinst and my proposed_iso-scan.postinst files

Thanks Sérgio

Revision history for this message
Sérgio Faria (sergio91pt) wrote :

Sylvain, this package is small so your diff shouldn't be a problem but when using diff directly its a good practice that all +++ lines, which are like metadata about where to apply the patch, contain the same name as the originals with a relative path 1 level higher than the package tree, specially when the diff patchesmore than one file.

So it gets like this:
--- iso-scan.orig/debian/iso-scan.postinst
+++ iso-scan/debian/iso-scan.postinst

And the dev, just needs to cd $PACKAGE; patch -p1 < patchfile instead of patch originalfile patchfile

I'm not sure why I had doubts in #1 but this bug does affect debian too and its just that line (I thought there were 2...).
I'll open a bug upstream.

Optionally, If you want, you can fix it directly by purposing a merge to the branch lp:~ubuntu-core-dev/iso-scan/ubuntu using the procedure mentioned in https://wiki.ubuntu.com/Bugs/HowToFix

Changed in iso-scan (Debian):
status: Unknown → New
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "iso-scan.postinst.diff" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Sylvain Dansereau (blinker73) wrote :

As a followup, after installing Precise beta 2 with iso-scan 1.37ubuntu1, I am still affected by this bug.

Changed in iso-scan (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.