[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] Rethinking appliance building

To make this even more explicit:

> (1) There has to be a way to detect that the package manager should
> be used, eg. by looking for /etc/arch-release

RPM: check for existence of /etc/redhat-release
Debian: check for existence of /etc/debian_version

> (2) There must be a way to take a list of package names, and fully
> resolve all dependencies (recursively as necessary) to get a complete
> list of packages that must be installed to bootstrap.

RPM: [lots of Yum API magic]
Debian: apt-cache depends --recurse -i <list of package names>

> (3) Must be a way to download a package.

RPM: yumdownloader <name of package>
Debian: aptitude download <name of package>

> (4) Must be able to list out the files in a downloaded package.

RPM: rpm -qlp foo.rpm
Debian: dpkg-deb -c foo.deb

> (5) Must be able to extract a single file from a downloaded package.

RPM: rpm2cpio foo.rpm | cpio -id
Debian: dpkg-deb --fsys-tarfile foo.deb | tar xf -

So it's almost enough for you to tell me the equivalent of those
commands for pacman, although of course I'd prefer a patch to


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.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]