Bug#148073: apt-cdrom cannot be made to not modify sources.list, and damages your system if you try
On 24 May 2002, Jeff Licquia wrote:
> > How is this the obvious way? Don't do that :P
>
> Well, if you want to tell a program to discard its output, you tell it
> to write to /dev/null. If you want it to read an empty file, you do the
> same.
It is not output, it is a file owned by APT. It makes backups by rename(),
as is it's right, since it owns the file :P
> Because I'm keeping track of the sources.list file myself. I read the
> output of apt-cdrom, extract the sources.list entry from that, and
> present it to the user. Later, if the user decides to keep the entry,
> it gets written to sources.list.
You would have a more robust program if you use the sources.list file it
writes than trying to parse the output, I might change it some day..
> It would seem that apt-cdrom is very uncooperative. It's not very easy
> to control how CD-ROMs get added to sources.list outside of "open a
> command line, type this magic...". But maybe I'm just using the wrong
> tool. Do you have any recommendations?
No, you have to use apt-cdrom. If you have some suggestions on how to
improve the command line interface, that could probably be done
(especially if they include patches :>)
Jason
--
To UNSUBSCRIBE, email to deity-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: