2 Replies Latest reply on Jun 21, 2016 8:10 PM by Rishikesh Dongre

    blcli_execute fails in for/while loop

    Rishikesh Dongre

      I'm using Network Shell 8.6.01.66 on Windows.

       

      If I run the below loop with value, no error reported.

      for RPMFILE in kernel-headers-2.6.18-410.el5.x86_64.rpm

      do

      blcli_execute Group getGroupByQualifiedName 5020 "${Patch_Catalog}"

      blcli_execute PatchCatalog getDBKeyByTypeAndNameFromCatalog RED_HAT_CATALOG_GROUP RPM_INSTALLABLE "${Patch_Catalog}" "${RPMFILE}"

      done

       

      But if i run as below , it gives error.

      for RPMFILES in `cat ../RHEL5`

      do

      blcli_execute Group getGroupByQualifiedName 5020 "${Patch_Catalog}"

      blcli_execute PatchCatalog getDBKeyByTypeAndNameFromCatalog RED_HAT_CATALOG_GROUP RPM_INSTALLABLE "${Patch_Catalog}" "${RPMFILE}"

      done

       

      in group : XYZ_RHEL_PatchCatalog with type : RPM_INSTALLABLEException: Cannot find depot object by name : kernel-2.6.18-410.el5.x86_64.rpm

      in group : XYZ_RHEL_PatchCatalog with type : RPM_INSTALLABLEException: Cannot find depot object by name : kernel-debug-2.6.18-410.el5.x86_64.rpm

      Command execution failed. com.bladelogic.om.infra.mfw.util.BlException: Cannot find depot object by name : kernel-debug-devel-2.6.18-410.el5.x86_64.rp

      in group : XYZ_RHEL_PatchCatalog with type : RPM_INSTALLABLE

      in group : XYZ_RHEL_PatchCatalog with type : RPM_INSTALLABLEException: Cannot find depot object by name : kernel-devel-2.6.18-410.el5.x86_64.rpm

      in group : XYZ_RHEL_PatchCatalog with type : RPM_INSTALLABLEException: Cannot find depot object by name : kernel-doc-2.6.18-410.el5.noarch.rpm

      in group : XYZ_RHEL_PatchCatalog with type : RPM_INSTALLABLEException: Cannot find depot object by name : kernel-headers-2.6.18-410.el5.x86_64.rpm

       

      Here is loop test -

      % for RPMFILE in `cat ../RHEL5`

      for> do

      for> echo $RPMFILE

      for> done

      kernel-2.6.18-410.el5.x86_64.rpm

      kernel-debug-2.6.18-410.el5.x86_64.rpm

      kernel-debug-devel-2.6.18-410.el5.x86_64.rpm

      kernel-devel-2.6.18-410.el5.x86_64.rpm

      kernel-doc-2.6.18-410.el5.noarch.rpm

      kernel-headers-2.6.18-410.el5.x86_64.rpm

      %

       

      please suggest.