[NBLUG/talk] Ubuntu

Troy Arnold troy at zenux.net
Tue Nov 29 01:22:07 PST 2005


On Mon, Nov 28, 2005 at 05:47:46PM -0800, E Frank Ball wrote:
> On Sun, Nov 27, 2005 at 10:24:11PM -0800, Troy Arnold wrote:
> } 
> } Ahh, you should play around with using aptitude as a straight apt-get
> } replacement:
> } aptitude install foo
> } aptitude update; apt-get upgrade
> } 
> } Its dependency handling is better for one.  Say you 'aptitude install
> } packageA' while pulls in packages B,C and D.  If you later 'aptitude
> } remove packageA' B, C, and D are gone also.  There's also some very cool
> } stuff in Sid WRT to conflict handling.  Aptitude will actually suggest
> } several different ways of handling a given dependency situation.
> 
> So as per your advice I tried using aptitude instead of apt-get to
> install a package, and I get this:
> 
> The following packages are unused and will be REMOVED:
>   bzip2 docbook-xml lesstif1 libperl5.8 libscrollkeeper0 libvte-common 
>   libvte4 libxslt1.1 scrollkeeper sgml-data synaptic vim vim-common 
>   xfonts-100dpi xfonts-75dpi xfonts-scalable xserver-common xserver-xfree86 
> 
> What the F????
> 
> I want bzip2.  I need lesstif1 for something I compiled.
> synaptic is a nice gui for browsing and installing packages.
> I can't live without vim, and the xserver is running!
> 
> apt-get install worked fine and didn't remove anything.
> What am I doing wrong?

Ahh.  When you use aptitude to install packageFoo and packageFoo depends
on libFoo then libFoo will be marked as 'Auto installed'  This way, when
you remove 'packageFoo' then libFoo will automatically be removed.
Kinda like a built-in deborphan if you've used that.  The thing is,
aptitude doesn't have this meta-data about packages installed via other
methods.  

One way around this would be to tell aptitude that your other stuff was
NOT automatically installed:
aptitude unmarkauto '~i'

'~i' is a search pattern meaning all installed packages

(Aptitude search patterns are very similar to those of Mutt)
Here's a copy of the aptitude manual:
http://doc2.inf.elte.hu/doc/aptitude/html/en/ch02.html

You might find the -s flag handy, it tells aptitude to simulate actions
without actually changing anything.  Also nice, is that you can run
aptitude as a regular user, at least until you actually have it DO
something.

Trying not to sound like an aptitude salesman, I'll just say that its
benefits become more apparent over time (as it becomes better aware of your
package installation history) and as you become more familiar with its
advanced searching features.


-troy



More information about the talk mailing list