LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 09-24-2010, 11:26 AM   #1
Blaumieser
Member
 
Registered: Sep 2003
Distribution: aptosid
Posts: 40
Blog Entries: 4

Rep: Reputation: 15
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.


Cheers,
Blaumieser
 
Old 09-24-2010, 11:47 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 09-25-2010, 07:38 AM   #3
Blaumieser
Member
 
Registered: Sep 2003
Distribution: aptosid
Posts: 40

Original Poster
Blog Entries: 4

Rep: Reputation: 15
Hi Simon,
Quote:
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
 
Old 09-25-2010, 08:06 AM   #4
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
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.
 
Old 09-27-2010, 10:10 AM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 10-17-2010, 11:02 AM   #6
Blaumieser
Member
 
Registered: Sep 2003
Distribution: aptosid
Posts: 40

Original Poster
Blog Entries: 4

Rep: Reputation: 15
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?

I'll continue the search.

Greets,
BM
 
Old 11-13-2010, 10:26 AM   #7
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Rep: Reputation: 36
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!
 
0 members found this post helpful.
Old 11-13-2010, 11:08 AM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by mf93 View Post
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.
 
Old 11-13-2010, 02:36 PM   #9
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Rep: Reputation: 36
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.

Last edited by mf93; 11-13-2010 at 02:42 PM.
 
Old 11-13-2010, 02:43 PM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by mf93 View Post
apt-get update --fix-missing is used to repair broken links to packages, which you are confusing with apt-get install --fix-missing
Sorry, I really was confused there, you are absolutely right.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ignore apt-get dependencies? pdeman2 Linux - Software 7 05-23-2006 08:08 PM
how to make apt-get ignore errors or dependencies? hisnumber666 Linux - Software 5 05-03-2006 07:01 PM
How to ignore a dependencie when apt-getting a soft ? Stéphane Ascoët Debian 1 10-23-2004 12:09 PM
k3b / cdrecord burning audio, How to ignore Media Capability? moskito01 Linux - Software 1 07-13-2004 06:29 PM
Does 'apt-get update' update the database used by 'apt-cache'? davidas Debian 5 04-20-2004 01:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration