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

Re: r31113 - trunk/packages/apt-setup/generators

On Sun, Oct 02, 2005 at 12:32:40PM -0400, Joey Hess wrote:
> Colin Watson wrote:
> > Author: cjwatson
> > Date: Sun Oct  2 11:59:32 2005
> > New Revision: 31113
> > 
> > Modified:
> >    trunk/packages/apt-setup/generators/50cdrom
> > Log:
> > 'printf > $tmp' is apparently pointless and doesn't work anyway
> Hmm, IIRC the point was that apt-cdrom add fails if Dir::Etc::SourceList
> does not exist, and so we want to create an empty file and maybe didn't
> have touch?

There's no need to create an empty file, because tempfile (called
immediately beforehand) has already done so:

  $ tempfile
  $ ls -l /tmp/fileFSxzNb
  -rw-------  1 cjwatson cjwatson 0 2005-10-02 18:45 /tmp/fileFSxzNb

A portable solution that doesn't require touch would simply be '> file'.
'printf' without arguments just prints a usage message (which I *guess*
has the intended result as a side-effect, but ugh).

> Hmm, I also doubt the current 50cdrom will work inside d-i, as it
> doesn't chroot to run apt-cdrom.

That seems to be an obvious fix, since Dir::Etc::SourceList is relative
to $ROOT anyway. Committed.


Colin Watson                                       [cjwatson@debian.org]

Reply to: