« Return to Thread: [jira] Created: (MUNIX-25) Implement setting file attributes on dpkg assembly operations

[jira] Commented: (MUNIX-25) Implement setting file attributes on dpkg assembly operations

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View in Thread


    [ http://jira.codehaus.org/browse/MUNIX-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179856#action_179856 ]

Trygve Laugstol commented on MUNIX-25:
--------------------------------------

Oh, you can use VfsTool.toFile(..) (IIRC) to get a File object from a FileObject.

The addition to FsFileCollector is actually fine, I'll make a first-order function in UnixUtil which should make it look better.

> 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
>            Assignee: Trygve Laugstol
>
> 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


 « Return to Thread: [jira] Created: (MUNIX-25) Implement setting file attributes on dpkg assembly operations