[kwlug-disc] dumb debian question: install local package, get deps from net?

Chris Irwin chris at chrisirwin.ca
Thu Aug 13 14:06:21 EDT 2009


On Thu, 2009-08-13 at 11:27 -0400, Robert P. J. Day wrote:
> possibly the first in a series of silly debian questions since i've  
> never been a heavy debian user but am about to start.
> 
>    i have a local .deb file, which has uninstalled dependencies.  i  
> would like the variation of
> 
>    # dpkg -i blah.deb
> 
> that would install that local file, but wander off to the net for any  
> deps.  i've tried a number of dpkg and apt-get variations, but haven't  
> found the right one.

It seems unfortunate that there is no single command to do this. 

You can easily list the depends:
 $ dpkg-deb -I blah.deb | grep -e "^ Depends"

I'm not really going to cover sanitizing the depends list to pass to
aptitude as I'm not familiar enough with the array of possibilities that
can exist in the depends list. You could have "Foo | Bar", but I'm not
sure how to tell aptitude to pick one or the other. Also, specific
versions may be passed to aptitude, but it wouldn't understand something
like "Foo (<=1.2.3)" which may or may not occur. There may be other
limitations I can't think of (the most dangerous kind :)

Anyway, install these via aptitude, and install your deb as you were
trying before:
$ aptitude install Foo Bar=1.2 Baz
$ dpkg-i blah.deb

After installing your deb you may wish to mark the manually installed
dependancies as automatically installed. That way if you ever remove
'blah', the now unused packages will follow. 
$ aptitude markauto Foo Bar Baz

-- 
Chris Irwin <chris at chrisirwin.ca>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20090813/57a8816a/attachment.sig>


More information about the kwlug-disc mailing list