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

Re: Bug#148073: apt-cdrom cannot be made to not modify sources.list, and damages your system if you try



reopen 148073
thanks

On Fri, 2002-05-24 at 15:19, Jason Gunthorpe wrote:
> 
> On 24 May 2002, Jeff Licquia wrote:
> > What's worse is that the obvious way to cause it to not munge
> > sources.list damages your system.  If you pass "-o
> > Dir::Etc::sourcelist=/dev/null", apt-cdrom will happily replace the
> > character device node /dev/null with a text file containing the
> > sources.list line for the CD.
> 
> 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.

I get that it's not a good idea to do; however, I tend to think that
it's a bug.

> > So, for now, I'm passing "-o Dir::Etc::sourcelist=<temp_path>/junk" and
> > removing the junk file.  This is suboptimal, and arguably the behavior
> 
> I can't imagine why you would want to run apt-cdrom and discard the
> source.list entires. It makes no sense, all the work apt-cdrom does will
> be undone by apt-get if the entries are not preserved.

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.

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?


-- 
To UNSUBSCRIBE, email to deity-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: