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

Re: Poosible to hook on dpkg, dselect or apt?

On Sun, Aug 19, 2001 at 05:11:09PM +0200, Ulrich Eckhardt wrote:

> Thanks to all suggestions, here is what is now running at my site, in 
> /etc/apt/apt.conf.d/local-recommends:
> Dpkg::Pre-Install-Pkgs{
>  "xargs --max-args=1 dpkg -I|grep -e 'Package\|Suggests\|Recommends' "
> }
> gives out a list of installed packages and their Recommends or 
> Suggests-fields.

Another way to do it would be:

xargs --max-args=1 --replace=DEB dpkg --field DEB Package Recommends Suggests

Which is more correct, since it won't (for example) match any lines containing
Package, Recommends or Suggests in the description of the package.

Of course, both will still report this information over and over for upgraded
packages, and continue to report recommends and suggests that you already have
installed, which is too much noise for me.  You could filter out upgraded
packages using the version 2 pipeline from APT, but checking for installed
packages will require reading the status file or dpkg --get-selections every
time, which is annoying.

This functionality really belongs in the frontend itself, though there is no
good way to present it to the user from apt-get.

 - mdz

Reply to: