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

Bug#564441: marked as done (iso-scan: proposed patch to select an ISO among multiple ones)

Your message dated Sun, 13 Mar 2011 06:47:08 +0000
with message-id <E1Pyf52-0005Rh-Fn@franck.debian.org>
and subject line Bug#564441: fixed in iso-scan 1.32
has caused the Debian Bug report #564441,
regarding iso-scan: proposed patch to select an ISO among multiple ones
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

564441: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=564441
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: iso-scan
Version: 1.28
Severity: wishlist
Tags: patch


  I asked back in october 2009 if it was possible to select the ISO
image we want to use when there are multiple ISO files available on the
installer media (see

  After a while, I tried to build a patch to iso-scan package to do it
(see attached file). I'm not familiar with debconf nor installer, so
I'm not sure I've done the right way.

  I see 2 solutions for my problem :
- either I parse all ISO files from all disks/partitions, and ask for
choice if any : I thought it could be quite long to parse all
partitions, and this way all installer' users have to wait for this.
- either after each ISO file found, we ask if it's the right one. I
followed this last track, and put the question with a 'medium'
debconf level, so in 'normal' installations, the question shouldn't
either appear and block the user (it would also be annoying to add a
step to all people for a need of few ones).

I've patched the iso-scan source and tried to test the result, without
success, because I didn't know how to rebuild a whole installer image.

Here is what I've done, if you see some advices to let me achieve the
tests, tell me ; if someone could also test the patch, it would be
nice !

- on a USB drive with already a debian installer system and 2 debian
iso (Lenny and testing), I've put my modified iso-scan.postinst and
iso-scan.templates files. I've then started on it with qemu :

$ qemu -hda /dev/sdb -vnc :0

and added 'install debconf/priority=medium' to the kernel cmd line.

$ after selecting language, country and locale, I selected the menu
entry to get a shell, and inside, I mound the usb disk partition and
copy from it iso-scan.postinst in /var/lib/dpkg/info/ (replacing
original one) and I load iso-scan.templates :

$ mkdir /media/usbdisk
$ mount /dev/hda2 /media/usbdisk -t ext2
$ cp /media/usbdisk/iso-scan.postinst /var/lib/dpkg/info/
$ debconf-loadtemplate iso-scan /media/usbdisk/iso-scan.templates
$ exit

And then I go back to the menu and select item to search for an
installation ISO

but the item fails, and looking in /var/log/syslog, I get that
iso-scan's new debconf template is not found :-(
(debconf returns : RET='10 iso-scan/ask_right_iso does'nt exist')

I also tried to restart debconf process by killing it, with more

  Thanks for your attention,

-- System Information:
Debian Release: 5.0.3
  APT prefers stable
  APT policy: (990, 'stable'), (800, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Naur iso-scan-1.28ref/debian/changelog iso-scan-1.28+testiso1/debian/changelog
--- iso-scan-1.28ref/debian/changelog	2009-06-11 22:01:33.000000000 +0200
+++ iso-scan-1.28+testiso1/debian/changelog	2010-01-07 10:05:05.000000000 +0100
@@ -1,3 +1,10 @@
+iso-scan (1.28+testiso1) unstable; urgency=low
+  * Non-maintainer upload.
+  * Test to ask if found ISO is the right one.
+ -- Frédéric Boiteux <fboiteux@free.fr>  Thu, 07 Jan 2010 10:03:55 +0100
 iso-scan (1.28) unstable; urgency=low
   [ Colin Watson ]
diff -Naur iso-scan-1.28ref/debian/iso-scan.postinst iso-scan-1.28+testiso1/debian/iso-scan.postinst
--- iso-scan-1.28ref/debian/iso-scan.postinst	2009-01-10 01:25:38.000000000 +0100
+++ iso-scan-1.28+testiso1/debian/iso-scan.postinst	2010-01-07 11:16:07.000000000 +0100
@@ -17,12 +17,12 @@
 	db_progress INFO iso-scan/progress_mount
 	mount -t auto -o ro $dev_to_mount /hd-media 2>/dev/null
 is_debian_iso () {
 	test -e /cdrom/.disk/info
-register_cd () {
+analyze_cd () {
 	# Make sure that the iso is usable for the architecture. If so,
 	# set the suite and codename to the suite/codename that is on the CD.
 	# This assumes that there will be no more than one distribution on
@@ -38,12 +38,8 @@
 			suite=$(sed -n 's/^Suite: *//p' $relfile)
 			codename=$(sed -n 's/^Codename: *//p' $relfile)
 			log "Detected ISO with '$suite' ($codename) distribution"
-			db_set cdrom/suite $suite
-			db_set cdrom/codename $codename
-			db_subst iso-scan/success SUITE $suite
 			description=`sed -n 's/^Description: *//p' $relfile`
-			db_subst iso-scan/success DESCRIPTION $description
 			return 0
@@ -52,6 +48,46 @@
 	return 1
+register_cd () {
+	# Make sure that the iso is usable for the architecture. If so,
+	# set the suite and codename to the suite/codename that is on the CD.
+	# This assumes that there will be no more than one distribution on
+	# the CD, and that one of the testing, stable, or unstable links will
+	# point to it. Since the CDs currently have many links, parse the
+	# Release file to get the actual suite name to use.
+	# Prefer the suite in default-release.
+  if analyze_cd; then
+    # Ask user if the found ISO is the expected one ; if not, the scan will
+    # continue, to find another ISO image elsewhere.
+    #
+    # Ask about if the found ISO is the correct target ?
+		log "Ask if ISO $iso_to_try is the good one"
+	  db_subst iso-scan/ask_right_iso FILENAME    $iso_to_try
+	  db_subst iso-scan/ask_right_iso SUITE       $suite
+	  db_subst iso-scan/ask_right_iso CODENAME    $codename
+	  db_subst iso-scan/ask_right_iso DESCRIPTION $description
+	  db_input medium iso-scan/ask_right_iso || true
+	  db_go || true
+	  db_get iso-scan/ask_right_iso
+	  if [ "$RET" != true ]; then
+		  log "Not the right ISO (RET='$RET')"
+      return 1
+    fi
+		db_set cdrom/suite $suite
+		db_set cdrom/codename $codename
+		db_subst iso-scan/success SUITE $suite
+		db_subst iso-scan/success DESCRIPTION $description
+		return 0
+	fi
+	return 1
 # Try to mount a file as an iso, and see if it's a Debian cd.
 try_iso () {
diff -Naur iso-scan-1.28ref/debian/iso-scan.templates iso-scan-1.28+testiso1/debian/iso-scan.templates
--- iso-scan-1.28ref/debian/iso-scan.templates	2009-02-25 08:32:12.000000000 +0100
+++ iso-scan-1.28+testiso1/debian/iso-scan.templates	2010-01-07 09:57:52.000000000 +0100
@@ -35,6 +35,17 @@
 # :sl3:
 _Description: Scanning ${DRIVE} (in ${DIRECTORY})...
+Template: iso-scan/ask_right_iso
+Type: boolean
+Default: true
+# :sl3:
+_Description: Is ISO file ${FILENAME} the right image for installation?
+ The ISO file ${FILENAME} on ${DEVICE} (${SUITE}, code ${CODENAME},
+ self-described as '${DESCRIPTION}') will be used as the
+ installation ISO image.
+ If you have multiple ISO files on the same installer drive,
+ you may select here which one you want to use now.
 Template: iso-scan/ask_second_pass
 Type: boolean
 Default: false

--- End Message ---
--- Begin Message ---
Source: iso-scan
Source-Version: 1.32

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

  to main/i/iso-scan/iso-scan_1.32.dsc
  to main/i/iso-scan/iso-scan_1.32.tar.gz
  to main/i/iso-scan/iso-scan_1.32_all.udeb
  to main/i/iso-scan/load-iso_1.32_all.udeb

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

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 564441@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Christian Perrier <bubulle@debian.org> (supplier of updated iso-scan 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 ftpmaster@debian.org)

Hash: SHA1

Format: 1.8
Date: Sat, 12 Mar 2011 19:58:42 +0100
Source: iso-scan
Binary: iso-scan load-iso
Architecture: source all
Version: 1.32
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Christian Perrier <bubulle@debian.org>
 iso-scan   - Scan hard drives for an installer ISO image (udeb)
 load-iso   - Load installer components from an installer ISO (udeb)
Closes: 564441
 iso-scan (1.32) unstable; urgency=low
   [ Joey Hess ]
   * Fix insufficient quoting.
   [ Frans Pop / Frédéric Boiteux ]
   * Nearly complete rewrite of iso-scan.postinst to allow choosing
     the ISO image to use. Closes: #564441
   [ Updated translations ]
   * Nepali (ne.po)
 fd81300287b8fcc7f9c49d66e2e5917eecb16780 1480 iso-scan_1.32.dsc
 f894325ae2d93b268722d2cc0afd8d598607361f 79625 iso-scan_1.32.tar.gz
 7972cb51c6a331f8559e3845735ab7c52dd13110 28828 iso-scan_1.32_all.udeb
 253ceaba2fd09660836a4b5c812cd15ecd465c47 3976 load-iso_1.32_all.udeb
 156f906462648e0ffa5eec92befc49434f3e5a4c21af29ef22b2558354240a99 1480 iso-scan_1.32.dsc
 5890e16414495ae9224d4df757c40fb854cfed907b4976e27fa180f98548558b 79625 iso-scan_1.32.tar.gz
 449844892b6d9cd23a242a1cf5c97f02ef928daafd68e7bbfece8e8f4b8039d0 28828 iso-scan_1.32_all.udeb
 9fa646078e847eea216203f02d9eac40f437e52999c9a495627f5540cb31edcc 3976 load-iso_1.32_all.udeb
 21c20f1a6b4c2fb8009f6aee519f9c9e 1480 debian-installer optional iso-scan_1.32.dsc
 5a3c3d9151de8f0e4c21318699cec87e 79625 debian-installer optional iso-scan_1.32.tar.gz
 4a4cf439a6bee8b04214e201e483b4b9 28828 debian-installer optional iso-scan_1.32_all.udeb
 f8c4fe7a2f3df359262d312887f03b23 3976 debian-installer extra load-iso_1.32_all.udeb
Package-Type: udeb

Version: GnuPG v1.4.11 (GNU/Linux)


--- End Message ---

Reply to: