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

Bug#652987: the cdrom path is not disabled in sources.list



Package: apt-setup
version: 0.56

While installing debian using the live-installer package, the cdrom path
in the sources.list exists after the completion of the installation in
sources.list. While reloading the synaptic package manager, it shows the
error: "Failed to load cdrom..."

A patch for resolving this issue is attached.

-- 
Regards,
Prathibha
C-DAC
Chennai



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

diff -Naur apt-setup-0.56-orig/finish-install.d/10apt-cdrom-setup apt-setup-0.56/finish-install.d/10apt-cdrom-setup
--- apt-setup-0.56-orig/finish-install.d/10apt-cdrom-setup	2011-06-19 08:08:25.000000000 +0530
+++ apt-setup-0.56/finish-install.d/10apt-cdrom-setup	2011-12-22 09:17:48.000000000 +0530
@@ -1,12 +1,16 @@
 #! /bin/sh
 set -e
 
-# Disable netinst CD image in sources.list if any other sources are present
-if [ -e /cdrom/.disk/base_installable ] && \
-   [ -e /cdrom/.disk/cd_type ] && \
-   [ "$(cat /cdrom/.disk/cd_type)" = not_complete ] && \
-   grep -q "^deb \(ht\|f\)tp" /target/etc/apt/sources.list; then
-	logger -t finish-install "Disabling netinst CD in sources.list"
-	sed -i "/^deb cdrom:/s/^/#/" /target/etc/apt/sources.list
-	log-output -t finish-install chroot /target apt-get update
+disable_cdrom_path()
+{
+   logger -t finish-install "Disabling the install CD path in sources.list"
+   sed -i "/^deb cdrom:/s/^/#/" /target/etc/apt/sources.list
+   log-output -t finish-install chroot /target apt-get update
+}
+
+# Disable CD path in sources.list
+if [ -e /cdrom/.disk/base_installable ] && [ -e /cdrom/.disk/cd_type ] && \
+   ( [ "$(cat /cdrom/.disk/cd_type)" = not_complete ] && grep -q "^deb \(ht\|f\)tp" /target/etc/apt/sources.list ) || \
+   ( [ "$(cat /cdrom/.disk/cd_type)" = live ] && grep -q "^deb cdrom:" /target/etc/apt/sources.list ); then
+ 	disable_cdrom_path
 fi

Reply to: