|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (MUNIX-25) Implement setting file attributes on dpkg assembly operationsImplement 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 |
|
|
[jira] Commented: (MUNIX-25) Implement setting file attributes on dpkg assembly operations[ http://jira.codehaus.org/browse/MUNIX-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179820#action_179820 ] Trygve Laugstol commented on MUNIX-25: -------------------------------------- The FsFileCollector could possibly be refactored to use File instead, as you say it might not be as useful. It has some handy copy operations, but those can be implemented fairly easy if it make something else easier to implement. The plan with the dpkg support is to re-implement all of the actual .deb building in Java as it is quite easy. The only risky part is implementing a proper control file generatior, but that shouldn't be much of an issue. I won't have time to rework the FsFileCollector for another week or two, but after that I might have time to do the entire Dpkg refactoring. Let me know if you want to fix the FsFC for now and I can at least apply your patches. > 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 |
|
|
[jira] Commented: (MUNIX-25) Implement setting file attributes on dpkg assembly operations[ http://jira.codehaus.org/browse/MUNIX-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179821#action_179821 ] Trygve Laugstol commented on MUNIX-25: -------------------------------------- Another (hacky) way is to run chmod in postinst. > 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 |
|
|
[jira] Commented: (MUNIX-25) Implement setting file attributes on dpkg assembly operations[ http://jira.codehaus.org/browse/MUNIX-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179842#action_179842 ] Luis Arias commented on MUNIX-25: --------------------------------- Thanks for the info ! Yes I tried chmod in postinst (too quickly), but I hadn't gotten it to work. I will work on reimplementing FsFileCollector on File. I suppose its ok to use commons-io for copying files around ? > 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 |
|
|
[jira] Commented: (MUNIX-25) Implement setting file attributes on dpkg assembly operations[ http://jira.codehaus.org/browse/MUNIX-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179845#action_179845 ] Trygve Laugstol commented on MUNIX-25: -------------------------------------- Hm, running chmod in postinstall will work. Try adding "set -x" to the start of your postinstall script to get more debugging info from the shell. Also add "set -e" if you want the script to stop at first failure. I'd like you do use plexus-utils as that already is a dependency, but commons-io is ok if you're more comfortable with that. I can change it later if appropriate. > 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 |
|
|
[jira] Commented: (MUNIX-25) Implement setting file attributes on dpkg assembly operations[ http://jira.codehaus.org/browse/MUNIX-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179846#action_179846 ] Luis Arias commented on MUNIX-25: --------------------------------- I think I found a quicker hack to at least set the mode by gettting the absolute file path from FileObject.getFileName() and calling UnixUtils.chmod(). Working on it. I think there will be an issue with setting user and group through a unix system call because the target user and group may not exist on the build machine. Maybe it is a good idea to use vfs but we would need a debian package provider for it to do things right I think. > 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 |
|
|
[jira] Commented: (MUNIX-25) Implement setting file attributes on dpkg assembly operations[ http://jira.codehaus.org/browse/MUNIX-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179848#action_179848 ] Luis Arias commented on MUNIX-25: --------------------------------- Ok this does the trick, doesn't look very nice, please review it, I imagine it would be better to have a helper method: === modified file 'unix-core/src/main/java/org/codehaus/mojo/unix/core/FsFileCollector.java' --- unix-core/src/main/java/org/codehaus/mojo/unix/core/FsFileCollector.java 2009-04-29 19:07:41 +0000 +++ unix-core/src/main/java/org/codehaus/mojo/unix/core/FsFileCollector.java 2009-06-10 08:11:49 +0000 @@ -119,6 +119,16 @@ toFile.getParent().createFolder(); toFile.copyFrom( from, Selectors.SELECT_SELF ); toFile.getContent().setLastModifiedTime( to.lastModified.toDateTime().toDate().getTime() ); + FileAttributes fileAttributes = to.getFileAttributes(); + if (fileAttributes.mode.isSome()) { + UnixUtil.chmod(new File(fsRoot.getName().getPath() + File.separator + toFile.getName().getPath()), fileAttributes.mode.some().toOctalString()); + } + if (fileAttributes.group.isSome()) { + // TODO: chgrp operation + } + if (fileAttributes.user.isSome()) { + // TODO: chown operation + } return Unit.unit(); } }; > 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 |
|
|
[jira] Assigned: (MUNIX-25) Implement setting file attributes on dpkg assembly operations[ http://jira.codehaus.org/browse/MUNIX-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Trygve Laugstol reassigned MUNIX-25: ------------------------------------ Assignee: Trygve Laugstol > 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 |
|
|
[jira] Commented: (MUNIX-25) Implement setting file attributes on dpkg assembly operations[ 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 |
|
|
[jira] Updated: (MUNIX-25) Implement setting file attributes on deb assembly operations[ http://jira.codehaus.org/browse/MUNIX-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Trygve Laugstol updated MUNIX-25: --------------------------------- Component/s: deb Summary: Implement setting file attributes on deb assembly operations (was: Implement setting file attributes on dpkg assembly operations) > Implement setting file attributes on deb assembly operations > ------------------------------------------------------------ > > Key: MUNIX-25 > URL: http://jira.codehaus.org/browse/MUNIX-25 > Project: Maven 2.x Unix Plugin > Issue Type: Improvement > Components: deb > 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 |
|
|
[jira] Updated: (MUNIX-25) Implement setting file attributes on deb assembly operations[ http://jira.codehaus.org/browse/MUNIX-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Trygve Laugstol updated MUNIX-25: --------------------------------- Fix Version/s: 1.0-alpha-5 > Implement setting file attributes on deb assembly operations > ------------------------------------------------------------ > > Key: MUNIX-25 > URL: http://jira.codehaus.org/browse/MUNIX-25 > Project: Maven 2.x Unix Plugin > Issue Type: Improvement > Components: deb > Reporter: Luis Arias > Assignee: Trygve Laugstol > Fix For: 1.0-alpha-5 > > > 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 |
| Free embeddable forum powered by Nabble | Forum Help |