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

Re: [Libguestfs] [PATCH] Mask some package names if appliance is build for SUSE



On Tue, Jun 11, 2013 at 04:07:17PM +0200, Olaf Hering wrote:
> On Tue, Jun 11, Richard W.M. Jones wrote:
> 
> > But supermin is supposed to ignore packages that don't exist in the
> > distro.  This is a bug in supermin or the zypp plugin for supermin.
> 
> It looks like zypper has no "ignore unknown packages/provides" flag. 
> zypper .. install $pkg is called with an unknown package then zypper
> will just abort because it expects valid input.
> 
> Maybe there should be some code which iterates over "names" and lets
> zypper check for every single pkg and drop the ones which it can not
> resolve. Later the smaller "names" list can be passed to zypper.
> 
> Are other plugins more forgiving in this?

Yes.  For example, the yum/RPM plugin does effectively this:

  #!/usr/bin/python
  
  import yum
  import yum.misc
  import sys
  
  yb = yum.YumBase ()
  yb.setCacheDir ()
  
  patterns = ["bash", "notarealpackage"]
  pkgs = yb.pkgSack.returnPackages (patterns=patterns, repoid=0)
  for pkg in pkgs:
      print pkg

... which prints (after ages, for yum is very slow):

  bash-4.2.39-3.fc18.x86_64
  bash-4.2.45-1.fc18.x86_64

This is a feature of supermin, because it lets you have package lists
that don't need to be heavily conditionalized based on the precise
version of a distro, especially when packages are often being renamed
(like util-linux -> util-linux-ng and back again).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top


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