Chris's Wiki :: blog/linux/AptNonFavorite Commentshttps://utcc.utoronto.ca/~cks/space/blog/linux/AptNonFavorite?atomcommentsDWiki2005-07-09T06:21:46ZRecent comments in Chris's Wiki :: blog/linux/AptNonFavorite.By Chris Siebenmann on /blog/linux/AptNonFavoritetag:CSpace:blog/linux/AptNonFavorite:216bef8c2f4fa0aa7655b5214bf45a8c665d364cChris Siebenmann<div class="wikitext"><p>'apt-get -s upgrade' gives a list of actions, not a list of the packages
(even with '-q=2'). Plain lists of packages are useful for condensed
reporting and for passing to system management scripts for various
purposes.
</p>
<p>I can do:
</p>
<blockquote><pre>
apt-get -s -q=2 upgrade | awk '$1 == "Inst" {print $2}'
</pre>
</blockquote>
<p>but this is fragile if Debian considers the output of apt-get something
intended for humans instead of other programs, and therefor something
that they can change to look 'nicer'.
Which I rather suspect that they do, given everything else about apt-get.
</p>
<p>An internal 'apt-get update' need not be mandatory, just the default.
Turn it off with a command-line option in the rare cases that that's
necessary.</p>
</div>2005-07-09T06:21:46ZFrom 209.149.57.26 on /blog/linux/AptNonFavoritetag:CSpace:blog/linux/AptNonFavorite:63bd3036b9e3e38142d9f3d0b41c7f56b05c3379From 209.149.57.26<div class="wikitext"><blockquote><p>why doesn't 'apt-get upgrade' default to doing an 'apt-get update' at the start? Local caches and
databases are an implementation detail, not a user interface.
</p>
</blockquote>
<p>I think I mostly agree with you, but there actually have been a few times I have been glad that it doesn't. Although, in those cases I admit I was doing apt-get install, and not upgrade. I had removed a package that had been upgraded, but I didn't want to install the latest update -- just the version I had previously (which luckily was still on the archives).
</p>
<p>A small issue, but hey..
</p>
<blockquote><p>why is it so hard to get just a list of the packages that 'apt-get upgrade' will upgrade? (A list of the > package URIs is not the same thing.)
</p>
</blockquote>
<p>something more than "apt-get -s upgrade"?</p>
</div>2005-07-09T06:01:14Z