lib/solaris/patchdiag_entry.rb
def successor
      # I <3 consistency:
      # Obsoleted by : XXXXXX-XX
      # Obsoleted by: XXXXXX-XX
      # OBSOLETED by: XXXXXX
      # Obsoleted by: XXXXXX-XX OBSOLETED by WITHDRAWN
      # OBSOLETED by WITHDRAWN
      # OBSOLETED by XXXXXX
      # OBSOLETED by XXXXXX and XXXXXX # we ignore this pattern, see below
      # Obsoleted by XXXXXX-XX:
      # OBSOLETED by XXXXXX-XX:
      # WITHDRAWN Obsoleted by: XXXXXX-XX
      # WITHDRAWN PATCH Obsolete by:
      # WITHDRAWN PATCH Obsoleted by:
      # WITHDRAWN PATCH Obsoleted by XXXXXX-XX:

      # Fail if this entry is not actually obsolete
      raise Solaris::Patch::NotObsolete,
        "Entry #{patch.inspect} not obsolete" unless obsolete?

      # Fail if this entry is obsoleted by two patches (currently 2011/05/04
      # only 105716 and 105717)
      raise Solaris::Patch::MultipleSuccessors,
        "More than one successor for entry #{patch.inspect}" if synopsis =~ /obsolete(d?) by\s*(:?)\s*(\d+(-\d+)?)\s+and\s+(\d+(-\d+)?)/i

      # See if we can find a successor
      if synopsis =~ /obsolete(d?) by\s*(:?)\s*(\d+(-\d+)?)/i
        Patch.new($3)
      else
        raise Solaris::Patch::InvalidSuccessor,
          "Failed to parse successor to obsolete patchdiag entry for patch #{patch.inspect}"
      end
    end
# Return the Solaris::Patch by which this entry is obsoleted.
# Throws Solaris::Patch::NotObsolete if this entry is not obsolete.
# Throws Solaris::Patch::MultipleSuccessors if this entry has more than
# one successor.
# Throws Solaris::Patch::InvalidSuccessor if the "obsoleted by" entry cannot
# be understood.
Return the Solaris::Patch by which this entry is obsoleted.
Throws Solaris::Patch::NotObsolete if this entry is not obsolete.
Throws Solaris::Patch::MultipleSuccessors if this entry has more than
one successor.
Throws Solaris::Patch::InvalidSuccessor if the "obsoleted by" entry cannot
be understood.
Return the Solaris :: Patch by which this entry is obsoleted . Throws Solaris :: Patch :: NotObsolete if this entry is not obsolete . Throws Solaris :: Patch :: MultipleSuccessors if this entry has more than one successor . Throws Solaris :: Patch :: InvalidSuccessor if the " obsoleted by " entry cannot be understood .
def successor
       OBSOLETED by WITHDRAWN
       and XXXXXX # we ignore this pattern, see below
      -XX:
      raise Solaris::Patch::NotObsolete,
        "Entry #{patch.inspect} not obsolete" unless obsolete?
      raise Solaris::Patch::MultipleSuccessors,
        "More than one successor for entry #{patch.inspect}" if synopsis =~ /obsolete(d?) by\s*(:?)\s*(\d+(-\d+)?)\s+and\s+(\d+(-\d+)?)/i
      if synopsis =~ /obsolete(d?) by\s*(:?)\s*(\d+(-\d+)?)/i
        Patch.new($3)
      else
        raise Solaris::Patch::InvalidSuccessor,
          "Failed to parse successor to obsolete patchdiag entry for patch #{patch.inspect}"
      end
    end
def successor raise Solaris :: Patch :: NotObsolete , "Entry #{patch.inspect} not obsolete" unless obsolete? raise Solaris :: Patch :: MultipleSuccessors , "More than one successor for entry #{patch.inspect}" if synopsis =~ / obsolete(d?) by \s *(:?) \s *( \d +(- \d +)?) \s +and \s +( \d +(- \d +)?) /i if synopsis =~ / obsolete(d?) by \s *(:?) \s *( \d +(- \d +)?) /i Patch . new ( $3 ) else raise Solaris :: Patch :: InvalidSuccessor , "Failed to parse successor to obsolete patchdiag entry for patch #{patch.inspect}" end end
Return the Solaris::Patch by which this entry is obsoleted.
Return the Solaris :: Patch by which this entry is obsoleted .
# I <3 consistency: # Obsoleted by : XXXXXX-XX # Obsoleted by: XXXXXX-XX # OBSOLETED by: XXXXXX # Obsoleted by: XXXXXX-XX OBSOLETED by WITHDRAWN # OBSOLETED by WITHDRAWN # OBSOLETED by XXXXXX # OBSOLETED by XXXXXX and XXXXXX # we ignore this pattern, see below # Obsoleted by XXXXXX-XX: # OBSOLETED by XXXXXX-XX: # WITHDRAWN Obsoleted by: XXXXXX-XX # WITHDRAWN PATCH Obsolete by: # WITHDRAWN PATCH Obsoleted by: # WITHDRAWN PATCH Obsoleted by XXXXXX-XX: # Fail if this entry is not actually obsolete # Fail if this entry is obsoleted by two patches (currently 2011/05/04 # only 105716 and 105717) # See if we can find a successor