how to let apt-get update ignore installation media?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how to let apt-get update ignore installation media?
Hi all,
still a Debian noob I have once again a small question:
Short version:
Why does apt-get update since recently ask me for my installation DVD?
Long version:
In my sources.lst there is still an entry for the installation DVD.
I like that because if a package on DVD is still the newest version then there is no need to download it again. (If I comment out the DVD entry apt-get update will ignore the DVD but at the same time no package will ever be installed from it again, right?)
Since some time ago this was no problem as apt-get update didn't have a problem with the entry - or if it had (I don't really remember), there was just an error message and the process would continue with the other sources. But then this changed and now I'm asked to insert the disk (luckily I have only one DVD) every time and the routine waits until I have done so.
Is there a way to change that back?
I've read some apt documentation and the apt-* manual pages including apt.conf and some examples for that but could not find something useful though there might be something I missed because I didn't understand everything I saw.
Clearly, it makes sense that DVDs and the like can be included in apt-get update because some people update offline with these media. But (the standard) DVDs are read-only and the individual disks are identified by apt (see /var/lib/apt/cdroms.list). So the system should not expect an already known DVD to change but recognize if a new one is being used.
So what you want to do is insert a system dvd and run apt-get update to update packages from the dvd should that be needed BUT when you don't have the dvd inserted, you don't want the update process to consider the dvd?
The entry in sources.list means that each time apt checks its repos it will also check for a dvd - it used to be that an absent dvd would return the error "repository not available" and continue to check the others.
On my system, from recently, inserting system media results in an option to update from it appearing in the gui, otherwise the media is not checked. In my sources.list, my install media line is commented out. Have you tried just inserting the disk? Pick an install disk and stick it in the drive - what happens?
I suspect you can safely comment out the sources.list entry for the dvd and still update from a dvd if it is inserted.
So what you want to do is insert a system dvd and run apt-get update to update packages from the dvd should that be needed BUT when you don't have the dvd inserted, you don't want the update process to consider the dvd?
not quite, but nearly: I want to keep the DVD entry in the sources.lst so that Debian knows about the packages on the DVD and does not need to download them again when they are needed. But keeping the line in the sources.lst also means that Debian wants to update the information of the DVD when I issue apt-get update before an apt-get install or an apt-get upgrade. But the DVD never changes so updating doesn't make sense (there may be exceptions, see my first post).
If I recall correctly, in former times Debian also wanted to update the DVD information but then gave an error message and went on with the "real" online-sources, so no user action was required. Now Debian pauses and wants the DVD to be inserted, performs a lengthy scan and notes that nothing has changed (surprise!! ). I'm trying to produce the old behaviour again.
In my former distribution (Mandrake *cough*, Mandriva) one could mark sources as update sources and only these were searched for new package information on doing an equivalent of apt-get update. I thought that the part "updates" in a sources.lst would act as such an indicator but obviously I'm wrong.
Quote:
The entry in sources.list means that each time apt checks its repos it will also check for a dvd - it used to be that an absent dvd would return the error "repository not available" and continue to check the others.
Yes, this is exactly the behaviour I'm trying to restore!
Cheers,
Blaumieser
Last edited by Blaumieser; 09-25-2010 at 07:39 AM.
Reason: typo
See the man pages for apt.conf, apt-config and apt-cdrom
Code:
man apt.conf
man apt-config
man apt-cdrom
from a terminal. If there are no config options for your required behaviour, the developers have changed this behaviour deliberately and you should file it as a bug in the Debian bug-tracking system.
Have you tried putting a system disk in the drive while the cdrom list entry is commented out?
C'mon, it'll only take a moment. It is possible that the old behavior is no longer needed - comfy though it may be.
OTOH: if you want to use a non-standard CD for upgrading packages, Dutch is right, you need to scan it in with apt-cdrom.
Hi all,
thanks for your replies! Today I had some time for this issue again. I still cannot get debian to do what I want. I have two other installed and updated Squeezes and they don't require the cdrom even though it's active in the sources.lst. I tried to find out where the configurations are differing one but could not find anything... very strange. Maybe the solution is outside of /etc/apt?
in /etc/apt/sources.list put a pound sing(#) before any line that references the cdrom or the cdrom name and save it
then run apt-get update --fix-missing
done!
in /etc/apt/sources.list put a pound sing(#) before any line that references the cdrom or the cdrom name and save it
then run apt-get update --fix-missing
done!
That is not the behavior the OP wants, you should read posts carefully before responding. Besides that, the --fix-missing option is used when installing packages, not when updating the database.
apt-get update --fix-missing is used to repair broken links to packages, which you are confusing with apt-get install --fix-missing
ps. actually- try running apt-get update --fix-missing without commenting out the cd's.
pps. i personally like just taking the cd out of the equation when installing packages because i split one dvd over 6 machines and its a pain to switch it around every time i need something new installed. its also annoying when i take my laptop on trips and would have to remember the dvd.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.