Rename manageRootDir property in bundles

Alan Santos asantos at redhat.com
Tue Jul 23 14:32:03 UTC 2013


On Jul 23, 2013, at 9:29 AM, Lukas Krejci <lkrejci at redhat.com> wrote:

> Hi all,
> 
> In BZ 801464 (and 801926) (https://bugzilla.redhat.com/show_bug.cgi?id=801464), we're discussing the problems of manageRootDir property on the deployment units in bundles.
> 
> We have decided to take 2 actions on it:
> 1) A short term remedy to prevent people from shooting themselves in the foot
> 2) A long term overhaul of how bundles work to make them more similar to RPM/APT so that people are less surprised by the behavior.
> 
> I won't discuss 2) here because there will be plenty of opportunities to do that later when we start concentrating on it, but I'd like to discuss 1) with you.
> 
> As the subject suggests, one of the things we intend to do is to rename the manageRootDir property to something that more clearly expresses the true meaning of the setting. The other thing that we want to do is to make the parameter mandatory so that people are forced to think about the value to put in there when creating a new bundle (this will only affect the upload of new bundles. The system will be able to revert to bundle versions that are already uploaded).
> 
> So the one thing I'm gathering input for is the new name for manageRootDir. 
> 
> But what manageRootDir (which defaults to true) really means? If it is true (the default), the bundle deployer will delete any and all files (recursively) in the destination directory before deploying the bundle files into it. This means that it is guaranteed that the bundle destination only contains the bundle files. When manageRootDir is false, it means that that the files and directories at directly under the destination directory are left intact - this means that the bundle deployer will only overwrite the files that are also part of the bundle and, also, will replace any directories that are present in the bundle with the contents from the bundle - this means that the sub-directories are always wiped to conform to the contents of the bundle - there is currently no way of overriding that (and we don't search for a mechanism to provide that in this email).
> 
> There already have been some suggestions for the new name:
> 
> manageRootDir=true
> 
> could also be expressed like:
> 
> manageDestDirFully=true
> doNotTouchTopLevelDirectoriesFoundInDestDirButNotFoundInBundle=false
> ignoreTopLevelDirectoriesInDestDirButNotFoundInBundle=false
> cleanTopLevelDirectoriesFoundInDestDirAndNotFoundInBundle=true
> bundleToManageAllTopLevelDirectoriesInDestDir=true
> manageAllTopLevelDirectoriesInDestDir=true
> 
> I'll add a couple of suggestions, too:
> 
> cleanDestinationFully=true
> wipeDestinationDir=true
> alsoWipeUnmanagedFilesAndDirectoriesInDestination=true
> 

A relatively shallow suggestion: 

words like 'fully', 'manage' are vague. 

I'd think that terms like 'also', 'and', 'andnot' (!) would be better broken out into multiple switches for clarity. 


-alan



More information about the rhq-devel mailing list