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

Bug#564441: Bug#590568: hd-media boot.img.gz's installer cannot find squeeze RC2 iso file



On Tue 22/Feb/11 10:01, Christian Perrier wrote:
Apparently (I now remember that discussion), Frans Pop and the original
bug reporter came to an acceptable patch...so it just needs action by
someone for being applied.

I plan to do this in a foreseeable future (understand the upcoming
days..;:-)).

I'm using this patch and I must say I've been founding it useful.
But proposed patch has a kind of bug itself which appears when you
have mixed stable/testing isos.

If stable iso is founding as first one, then if you choose testing iso
the installer is searching a stable distribution on that testing iso
next.

Feb 13 11:06:29 main-menu[323]: INFO: Menu item 'load-iso' selected
Feb 13 11:06:29 anna[5485]: grep: /cdrom/dists/stable/Release: No such
file or directory
Feb 13 11:06:29 cdrom-retriever: error: No components listed in
/cdrom/dists/stable/Release.

But
~ # ls -l /cdrom/dists/
dr-xr-xr-x    4 root     root          2048 Oct 18 22:00 squeeze
lr-xr-xr-x    1 root     root             7 Oct 18 22:00 testing ->
squeeze

I'm not sure if stable iso should be found as first or to be present
only is enough. But the sure is that attached patch corrects the
problem. Not fully tested but works and is GEFM (good enough for me ;))
--- iso-scan.postinst.prev	2010-11-06 21:29:32.000000000 +0100
+++ iso-scan.postinst	2010-11-06 23:39:20.000000000 +0100
@@ -45,12 +45,11 @@
 
 			log "Detected ISO with distribution '$suite' ($codename)"
 
-			# FIXME: Should we display codename instead of suite?
-			# Would be more in line w/ current thinking about releases.
+			# Codename is neccessary later.
 			descr="$(printf "[%s] %s (%s)\n" \
 				 "$(echo $iso_device | sed -e 's?^/dev/??')" \
 				 "${iso_to_try#.}" \
-				 "$suite${version:+ - $version}")"
+				 "$codename${version:+ - $version}")"
 			# comma is used to separate possible ISO
 			echo "$descr" | sed -e 's/,/ /g'
 
@@ -182,7 +181,7 @@
 use_this_iso () {
 	local iso_to_try=${1#/}
 	local iso_device=$2
-  local suite=$3
+	local codename=$3
 	local RET
 
 	mount -t auto -o ro $iso_device /hd-media 2>/dev/null
@@ -192,7 +191,8 @@
 	db_subst iso-scan/success FILENAME $iso_to_try
 	db_set iso-scan/filename $iso_to_try
 	db_subst iso-scan/success DEVICE $iso_device
-	db_subst iso-scan/success SUITE $suite
+	db_set cdrom/codename $codename
+	db_subst iso-scan/success CODENAME $codename
 	db_input medium iso-scan/success || true
 	db_go || true
 
@@ -445,10 +445,10 @@
 
 device=/dev/$(echo "$SELECTED_ISO" | sed -e 's/^\[\(.*\)\] .*/\1/')
 iso=$(echo "$SELECTED_ISO" | sed -e 's/^\[.*\] \(.*\) (.*/\1/')
-suite=$(echo "$SELECTED_ISO" |
+codename=$(echo "$SELECTED_ISO" |
         sed -e 's/^\[.*\] .* (\(.*\))$/\1/' -e 's/ - ..*$//')
-log "Selected ISO: $iso on $device (suite $suite)"
+log "Selected ISO: $iso on $device (codename $codename)"
 
-use_this_iso $iso $device $suite
+use_this_iso $iso $device $codename
 
 exit 0

Reply to: