On Sat, 27 Jul 2002, Matt Hope wrote:

> : Anyone know of a tool which, given a list of packages and the appropriate
> : apt metadata, will download all those packages and *all* their dependencies?
> : I can get close with apt-get -d install <package list> and then getting them
> : out of /var/cache/apt, but that doesn't get packages which are already
> : installed and current on the host I run it on.
> 
> I just did a quick-hack shell script...

[snip]

> ... here is a copy:
> 
> % cat listpkg.sh 
> #!/bin/sh
> apt-cache dotty $* | tail +4 | \
>     grep -v 'color=springgreen\|color=orange\|shape=hexagon' | \
>     cut -d\" -f2 | grep '[a-z]' | sort -n | uniq

Very scary!  Looks like it lists all packages related to the given package,
whether it be a dependency or conflict.  Not *exactly* what I need, although
it does give me information I didn't have before - how I can get
dependencies out of apt-cache simply and easily...

> That'll give you the list of packages. I cant think of an efficently
> way, offhand, of downloading the named packages, other than using
> grep-dctrl or "apt-cache show $pkg | grep ^Filename" (sorry, not sure
> of the exact invocation for grep-dctrl), and appending that filename
> to a mirror url.

... and this gives me the other half of the puzzle.  So with some shell
dancing, I should be able to hack something up myself if there is nothing
existing to do the job (and I can't seem to find anything to do it).


-- 
-----------------------------------------------------------------------
#include <disclaimer.h>
Matthew Palmer, Geek In Residence
http://ieee.uow.edu.au/~mjp16

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to