Issue #4953 has been updated by Daniel Grafe. File Minimal-11-38.13.9.x86_64.pat added
> Can you expand a bit on how the logic works with: > > is_pattern = zypper "--quiet", "search", "-t", "pattern", wanted It will just search the local zypper cache for the existence of the given pattern. For instance: zypper --quiet search -t pattern minimal S | Name | Summary | Type --+---------+-----------------------------+-------- i | Minimal | Minimal System (Appliances) | pattern zypper --quiet search -t pattern not_existing_pattern No packages found. The following *if is_pattern =~ Regexp.new(wanted)* will then just try to find the pattern name in the output of the zypper call. In the first case (pattern existing) it will match. > is this an expensive operation? I don't think so. Running the above example with strace shows that zypper is using the local cache unter /var/cache/zypp. There is a gzipped file defining the pattern: /var/cache/zypp/raw/SUSE-Linux-Enterprise-Server-11-SP1 11.1.1-1.152/suse/setup/descr/Minimal-11-38.13.9.x86_64.pat.gz Running zypper on an Intel(R) Core(TM) i7 CPU @ 2.80GHz: grada...@dhcp29:~> time zypper --quiet search -t pattern Minimal S | Name | Zusammenfassung | Typ --+---------+-------------------------------+------- i | Minimal | Minimales System (Appliances) | Schema real 0m0.291s user 0m0.184s sys 0m0.072s > Can you list some patterns so we can see what they look like? I have attached an unzipped version of the Minimal pattern found in the local cache. It is basically a package list plus localized descriptions and mete information. ---------------------------------------- Feature #4953: Zypper Provider should support Patterns https://projects.puppetlabs.com/issues/4953 Author: Daniel Grafe Status: Needs more information Priority: Normal Assignee: Nigel Kersten Category: package Target version: Affected version: 2.6.0 Keywords: Branch: SUSE defines software package lists called patterns. These patterns are combining related packages to useful software collections. For instance, the pattern "Basis-Devel" would give you the autotools, gcc, kernel sources etc... Zypper can be used to install all packages from these lists by installing the pattern when setting the type explicitely to pattern. For example: zypper install -t pattern Basis-Devel When using the zypper provider in puppet it would be nice to be able to install these patterns. Please find attached our quick modification of the provider. It will detect if the given name identifies a pattern or a package and will call zypper with the appropriate flags. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
