1 2 Previous Next 23 Replies Latest reply on Feb 21, 2020 6:11 AM by SANTIAGO RIVAS

    Script to list associated RPM for an ERRATA

    Gilbert Morcel
      Share This:

      Hi

      I want to create an NSH script to build a list of rpm listed in a given Errata.

       

      This list is visible in console in a given Errata under the name "Associated RPM's"

       

      I already found a way to list all Erratas in an errata smart group, but not to get list of associated rpms.

      Sources:

      # https://communities.bmc.com/thread/135631?start=0&tstart=0

      # https://communities.bmc.com/thread/75238?start=0&tstart=0

       

      blcli_execute Group groupNameToId "/.... errata smartgroup" 5018

      blcli_storelocal SMRTGRPID

      blcli_execute DepotObject findAllHeadersByGroup $SMRTGRPID >/dev/null

      blcli_execute SDepotObjectHeader getName

      blcli_execute Utility setTargetObject

      blcli_execute Utility listPrint

      blcli_storelocal ERRATALST

      for ERRATA in $ERRATALST

      do

           blcli_execute DepotObject findAllByTypeAndName 305 "$ERRATA" >/dev/null

           blcli_execute DepotObject getDBKey >/dev/null

           blcli_execute Utility setTargetObject >/dev/null

           blcli_execute Utility listPrint

           ##     something here to get associated rpms from this errata...

      done

       

      any idea ?

        1 2 Previous Next