i'm intrerested in the same but I do want to know how to do it from blcli
I Have used some what a hack to do this.
You can get the fileserver location of the blpackage using blcli, once you have it, you can directly do edit of the bldeploy.xml using sed/awk and do a global replace
REMEMBER THIS IS A HACK, may be not recommended
Also this needs access open to the Fileserver area where blpackage lives.
There is not a great way to manipulate objects in a blpackage w/ the blcli…
That's an understatement. But maybe since I'm creating the whole thing in blcli dynamically there's a way to do it easier? I'm creating a Template with addDirectoryPart, and then creating a BLPackage with createPackageFromAsset based on the Template - everything works whent the target is a windows server.
when the target is Linux it errors out applying it because it tries to apply default "owner 0" and its not root
If only I could set the options to ignore Owner and Permissions part during deployment I'll be all set (I can do it in gui)
I saw something like that in unreleased help I believe it was importCompnentToPackage (PropNames, PropValues)
I'm looking for a way to specify the same with createPackageFromAsset or maybe after package is created later in the script?
do you need to get the acls? the addServerObjectToPackage or createPackageFromAsset let you say 'false' for 'collectFileAttributes', not sure if that actually works. same thing w/ your importComponentToPackage.
I was going to reply that I had made sure they were all set to 'false' already but double-checked and 'collectFileAttributes' was still 'true' in createPackageFromAsset call - set it to 'false' and it works now!
So in my case I had to set all 'bCollect*' parameters set to 'false' when making BLPackage.createPackageFromAsset calls
I'm just curious if there is any other setting that might cause the Deploy Job to still try to change owner permissions? I'm importing DepotFiles into a BLPackage via BLCLI, and setting the 5 bCollect parameters to False....and yet the deploy job still fails in its attempt to change Owner Permissions of the file.
I also have the same/similar issue, running 8.2.01.290. We are using BlPackage createPackageFromComponent (all of the bCollect... options are set to false), and in the Component, under "Snapshot/Audit", I have turned off all of the File/Directory group and user owner options for the Part. But when the package is created, the Group and Owner options are still set to "Apply":
blcli_execute DepotGroup groupNameToId / blcli_storeenv rootGroupId
echo Root Group Id = $rootGroupId
blcli_execute DepotGroup groupNameToId /testGroup blcli_storeenv testGroupId
if [ "$testGroupId" -eq "" ]; then
blcli_execute DepotGroup createDepotGroup testGroup $rootGroupId
echo testGroup Id = $testGroupId
blcli_execute BlPackage getDBKeyByGroupAndName /testGroup testEmptyPkg blcli_storeenv testEmptyPkgDBKey echo testEmptyPkgDBKey = $testEmptyPkgDBKey
if [ "$testEmptyPkgDBKey" = "" ]; then
blcli_execute BlPackage createEmptyPackage testEmptyPkg "test package" $testGroupId
echo testEmptyPkg Id = $testEmptyPkgId
blcli_execute DepotFile addFileToDepot /testGroup //localhost/c/tmp/test.txt "c - tmp - test.txt" "test text file"
blcli_execute BlPackage importDepotObjectToPackage /testGroup testEmptyPkg true true true false true /testGroup "c - tmp - test.txt" DEPOT_FILE_OBJECT "Action,OwnerOption" "Modify,1" NotRequired NotRequired blcli_storeenv pkgItemDBKey
if [ "$pkgItemDBKey" != "" ]; then
echo File added to package successfully.
That looks like it would indeed work, but won't help us, as we create our BLPackages from a Component. You would think that there would be some way to set this in the Component?
Scott's example is pretty much how I resolved the problem on my end (sorry for not posting solution sooner!)....
Both the importDepotObjectToPackage and importComponentToPackage take parameters for propNames and propValues.....that is what you would use to change the BLPackage properties.
I use "OwnerOption,GroupOption,PermissionsOption" "1,1,1" and that sets the properties to Ignore.
The importComponentToPackage did the trick! Works great, thanks!