Class Satsolver::Dataiterator
In: satsolver.i
Parent: Object

This class represents an Iterator for Solvable attributes.

Usage

The Dataiterator is the block argument for calls to search which is defined for Pool (search whole Pool) and Repository (limit search to Repository)

Example code

  • Search for exact string match in Pool
     pool.search("yast2", Satsolver::SEARCH_STRING) do |di|
       puts "#{di.solvable} matches 'yast2' in #{di.key.name}:  #{di.value}"
     end
    
  • Search for exact file match in Pool
     pool.search("/usr/bin/python", Satsolver::SEARCH_STRING|Satsolver::SEARCH_FILES) do |d|
       puts "#{d.solvable} matches '/usr/bin/python' in #{d.key.name}: #{d.value}"
     end
    
  • Search for exact file match in Repository
     repo.search("/usr/bin/python", Satsolver::SEARCH_STRING|Satsolver::SEARCH_FILES) do |d|
       puts "#{d.solvable} matches '/usr/bin/python' in #{d.key.name}: #{d.value}"
     end
    

Methods

Public Class methods

new(p1, p2, p3, p4, p5, p6)

:nodoc: Complete Dataiterator constructor, to be used via %python in Swig

Public Instance methods

position Dataiterator at a specific Repository

return corresponding Repokey, if defined

internal attributes, like solvable.name, don‘t have an explicit Repokey

keyname of the match

skip_attr()
skip_repo()
skip_solvable()

return the matching Solvable

iterator step

increments the Dataiterator to the next match

[Validate]