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

Re: Listing held packages for which there are upgrades

On 2009-06-08 19:13 +0200, Karl O. Pinc wrote:

> On etch when I did an 'aptitude upgrade' it would show
> the packages on hold that would have been upgraded
> but were held back.  On lenny this no longer happens.
> How do I get a list of those packages, and only those
> packages, that would be upgraded if they were not on hold?

It seems this is no longer possible.  From the NEWS entry for aptitude

    * At the command-line prompt, don't list packages that aren't
      being upgraded unless the user tried to upgrade them.  e.g.,
      "aptitude install foo" will no longer spew the entire list of
      pending upgrades to the terminal.

> FYI I want this mostly because I have too many systems
> to apply security updates to manually.   So I've a cron
> job that regularly does updates from the security team
> repository.  However I do not want critical packages,
> e.g. the kernel, upgraded by an automatic process.
> I put the packages I want to manually review on hold.
> I rely on the output from the cron jobs to notify me
> when there are updates available for such packages.
> Unlike, say the security-announce email list, the
> cron jobs keep emailing me until I apply the latest
> upgrades.  I can miss an email on occasion and not have
> to worry about missing an irreplaceable message.

At least aptitude will tell you how many packages are not upgraded:

| % LANG=C aptitude -s safe-upgrade 
| Reading package lists... Done
| Building dependency tree       
| Reading state information... Done
| Reading extended state information      
| Initializing package states... Done
| Reading task descriptions... Done  
| Resolving dependencies...
| The following packages have been kept back:
|  [...]
| The following packages will be upgraded:
|  [...]
| 4 packages upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
| Need to get 1445kB of archives. After unpacking 8192B will be freed.
| Do you want to continue? [Y/n/?] 
| Would download/install/remove packages.

Maybe you can adjust your script to mail you if the number of not
upgraded packages is > 0 ?


Reply to: