Implement setting file attributes on dpkg assembly operations
-------------------------------------------------------------
Key: MUNIX-25
URL: http://jira.codehaus.org/browse/MUNIX-25
Project: Maven 2.x Unix Plugin
Issue Type: Improvement
Reporter: Luis Arias
I would really like to use the maven unix plugin to generate a deb for my
project, I recently submitted a patch for some features I need in some form
such as setting depends in jira issue MUNIX-24. I did some work this morning
to try and figure out why I was unable to chmod 0755 some executable scripts
and realized that setting file attributes is not implemented in either the
setAttributes directive or in the copyDirectory directive. In my attempts to
implement the feature while respecting the codebase architecture I ran into
some problems that I need guidance with.
The mechanisms differ between the setAttributes and copyDirectory directives.
In the latter, files are really copied to the staging area when the
fileCollector is asked to collect() in DpkgUnixPackage.packageToFile().
However the packageFile() operation in FsFileCollector doesn't exploit the file
attribute information in the "to" UnixFsObject.RegularFile parameter.
I tried to then add some code there to at least do the chmod, even if the user
and group information is not taken into account but got stuck because I didn't
see how common vfs could support setting file attributes (there is a
setAttributes for FileContent but that seems to be something else) and the
underlying File instance in FileObject is protected.
So any ideas on how to proceed ? I don't really understand the use of vfs for
the file collector since as far as I can see the root-xxx staging area is
always on the local file system. I'm thinking the file attributes features
where left unimplemented because of some of these architectural issues.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email