On Thu, Nov 29, 2012 at 10:24:54PM +0100, Olaf Hering wrote:
On Thu, Nov 29, Richard W.M. Jones wrote:
> On Thu, Nov 29, 2012 at 09:02:34PM +0000, Richard W.M. Jones wrote:
> > > zypper \
> > > --verbose \
> > > --verbose \
> > > --gpg-auto-import-keys \
> > > --root /dev/shm/${LOGNAME} \
> > > --reposd-dir /etc/zypp/repos.d \
> > > --pkg-cache-dir /dev/shm/${LOGNAME}--pkg-cache-dir \
> > > --non-interactive \
> > > install \
> > > --auto-agree-with-licenses \
> > > --no-recommends \
> > > --download-only \
> > > kernel-default
>
> By the way, does this download everything (even, for example,
> packages which are already installed at the latest version)?
It will download kernel-default from the configured repos in
/etc/zypp/repos.d into --pkg-cache-dir. Installed packaged will not be
considered. Does febootstrap work with installed packages?
The idea of febootstrap is to create new instances of the operating
system, so essentially whatever is installed on the host we don't care
about.
ie:
febootstrap --names bash
will download 'bash' and all its dependencies and create a supermin
appliance out of them, whether or not bash + dependencies happen to be
installed on the host.
Of course "normal" yum commands and suchlike consider what's installed
on the host already and only install or upgrade packages. We don't
want that behaviour -- hence the complicated Python script (see link
in previous email).
If there's a way to do all this from the zypper C API, then we could
use that instead. Calling out to C from OCaml is simple -- in fact we
already do it in libguestfs. See example resize/progress-c.c, or for
the real documentation read:
http://caml.inria.fr/pub/docs/manual-ocaml-4.00/manual033.html
In short, we need a way to download all RPMs, starting at a set of
root packages (or root package names), without considering what is
installed already.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v