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

Re: Bug#71108: DPkg { Pre-Invoke ... } not working in apt.conf



Jason Gunthorpe <jgg@ualberta.ca> writes:
> On Thu, 7 Sep 2000, Dan Christensen wrote:
> 
> > The lines
> > 
> > DPkg {
> >   Pre-Invoke {"mount -o remount,rw /usr";};
> >   Post-Invoke {"mount -o remount,ro /usr";};
> > }
> > 
> > used to do the desired thing in my apt.conf file, but now they do
> > nothing.  However, the following lines
> 
> Can you try 'apt-config dump' and tell me if there are differences (there
> should be) and then can you include the whole non-working config file?

Ahh, you guessed right.  There was a mistake earlier in the config
file and "apt-config dump" made it clear.  My config file looked
like:

APT::Get::Purge
APT::Get::Show-Upgraded
DPkg {
  Pre-Invoke {"mount -o remount,rw /usr";};
  Post-Invoke {"mount -o remount,ro /usr";};
}
// Pre-configure all packages before they are installed.
// (Automatically added by debconf.)
DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};

The first two lines didn't have "true"; at the end, and that caused
them to get the mount options.  Maybe the config file parsing could
be made a bit stricter and report an error or a warning for such
mistakes?  Also, maybe the apt-get man page should point more
emphatically at the apt.conf man page?  E.g.

OPTIONS
       All   command   line   options   may   be  set  using  the
       configuration  file.   The   descriptions   indicate   the
       configuration  option  to set, see apt.conf(5) for the syntax. 
       For boolean options you can ...

Or maybe even

OPTIONS
       All   command   line   options   may   be  set  using  the
       configuration  file.   The   descriptions   indicate   the
       configuration  option  to set.  An example of the syntax
       for boolean operations is 
           APT::Get::Download-Only = "true";
       See apt.conf(5) for the syntax of more complicated options. 
       For boolean options you can ...

Finally, apt-config(8) should be listed at the end of the apt-get and
apt.conf man pages, I think.

Sorry to bother you with a user error.

Dan

-- 
Dan Christensen
jdc@julian.uwo.ca



Reply to: