LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   apt-get updates waste time requiring re-scanning my Debian dvds (https://www.linuxquestions.org/questions/debian-26/apt-get-updates-waste-time-requiring-re-scanning-my-debian-dvds-866833/)

mark_alfred 03-06-2011 06:21 PM

apt-get updates waste time requiring re-scanning my Debian dvds
 
Hello. I have the eight Debian dvds listed in my sources.list, along with security, nonfree, and multimedia repositories. Whenever I update now, I get the following:
Code:

Media change: please insert the disc labeled                                 
 'Debian GNU/Linux 6.0.0 _Squeeze_ - Official i386 DVD Binary-8 20110205-17:27'
in the drive '/cdrom/' and press enter

It does this for all eight dvds, re-scanning them for the update. These dvds have already been scanned (from the apt-cdrom add command). New updates are NOT going to suddenly appear on these already scanned dvds, so this is a completely unnecessary endeavour. Is there a way to stop this? It didn't happen with Lenny, and I'd like to stop it with Squeeze.

andrewthomas 03-06-2011 06:22 PM

comment them out of your sources.list

EDDY1 03-06-2011 06:26 PM

@mark alfred I'm surprised that you forgot.
It must be a new installation.

Btw I have the Dell Optiplex GX1 with 500Mhz cpu.

mark_alfred 03-06-2011 06:31 PM

I actually did not forget. I use dial-up, so I prefer relying upon dvds rather than the internet for my the bulk of my sources.list. Previously an update would not require having to pull out and rescan all the dvds; this is something new (I just recently upgraded).

mark_alfred 03-15-2011 07:44 PM

Please help w/ this answer from the bug report I did
 
Hello. I posted this issue to an existing bug with the Debian developers of apt-get. An answer was provided. This answer has worked for the other user who posted the same bug, but I have not been able to use this answer to solve the issue on my computer. The developer stated,
Quote:

Originally Posted by debian developer
Could you please try the attached patch? That should fix the problem.

Cheers,
Michael

The "attached patch" was a file named "apt-cdrom-fix.diff". I downloaded this file, and tried to use it:
Code:

debian:/home/mark/stuff/upgrade_notes# patch < apt-cdrom-fix.diff
patching file acquire-item.cc
Hunk #1 FAILED at 861.
1 out of 1 hunk FAILED -- saving rejects to file acquire-item.cc.rej
debian:/home/mark/stuff/upgrade_notes#

Does anyone know what I'm doing wrong? I still have "apt-get update" demand all the listed DVDs to be rescanned.

andrewthomas 03-15-2011 08:22 PM

Did you try to manually patch the file? It was only a couple of lines long.

TobiSGD 03-15-2011 08:27 PM

This patch is meant to be applied to the source code of apt-cdrom. After that you have to compile that source code and install the new compiled program (preferably after you packaged it). It is not meant to fix the already installed program.

mark_alfred 03-15-2011 08:28 PM

Quote:

Originally Posted by andrewthomas (Post 4292033)
Did you try to manually patch the file? It was only a couple of lines long.

I really am not familiar with the patching of files, either manual or automatic (or whatever). In fact, the response to the bug report was the first I had ever heard of patching a file. So, I did an internet search, and came up with "patch < file.diff" as something to try. If you could let me know how else I can approach this (manually, automatically, or anyway) then I would much appreciate it.

mark_alfred 03-15-2011 08:33 PM

Quote:

Originally Posted by TobiSGD (Post 4292038)
This patch is meant to be applied to the source code of apt-cdrom. After that you have to compile that source code and install the new compiled program (preferably after you packaged it). It is not meant to fix the already installed program.

Ah. Thanks. That's helpful. I'll try to get the source, and screw around with that for a while. Hopefully I'll be able to solve this issue.

mark_alfred 03-15-2011 10:10 PM

Success! I enable deb-src repository, got the source, applied the patch, created the deb file, installed it, and now I can update without having to insert all eight DVDs for rescanning. I'm glad that irritation is gone.

alrojas 03-17-2011 12:57 PM

hi mark_alfred!.

I have the same problem!. Could you explain solution step by step?, please :)
Thanks for all.

mark_alfred 03-20-2011 09:58 AM

I pretty well described everything above. See the manual for tips on working with sources.

EDDY1 03-20-2011 11:58 AM

I had similar problem yesterday,
It was due to backports being listed different
deb http://backports.debian.org/debian-backports squeeze-backports main
deb http://www.backports.org/debian lenny-backports main contrib non-free


All times are GMT -5. The time now is 02:36 AM.