1 Reply Latest reply on Mar 24, 2015 8:51 AM by Bill Robinson

    createPackageFromComponent how to check package exists....

    Narahari 'n' Savitha



      I have the following call inside my script.


      It failed on me yesterday because the package with that particular name exists.

        blcli_execute BlPackage createPackageFromComponent "${PKG_NAME_CRNT}" $DEPOT_GROUP_ID $PACKAGE_OPTIONS $COMPONENT_KEY
        blcli_storeenv PACKAGE_DBKEY
        echo "## PACKAGE_DBKEY=${PACKAGE_DBKEY}"


      Is there a way to check if a particular package name exists under a given folder ?


      I am looking on the lines of

        blcli_execute "DepotGroup" groupExists  "${PKG_FOLDER}/${PAAS_VER_WITH_V}"
        ouch "$?" $LINENO
        blcli_storeenv depotGroupExists
        if [ "${depotGroupExists}" = "true" ];


      The above approach allows me to check if the groupExists before I go and create the the group.


      So I am looking for a call like


        Pseudo code:


        blcli_execute BlPackage <packageExists> <DepotGroup> <pkgName>


        Some thing like this is what I am looking for.