* @throws IOException if an IO error occurs either in reading the configuration file, reading
* an input file to the RPM, or during RPM creation
*/
public void run( XmlEditor editor, File destination) throws NoSuchAlgorithmException, IOException {
editor.startPrefixMapping( "http://redline-rpm.org/ns", "rpm");
Contents include = new Contents();
for ( Node files : editor.findNodes( "rpm:files")) {
try {
editor.pushContext( files);
int permission = editor.getInteger( "@permission", DEFAULT_FILE_PERMISSION);
String parent = editor.getValue( "@parent");
if ( !parent.endsWith( "/")) parent += "/";
for ( Node file : editor.findNodes( "rpm:file")) {
try {
editor.pushContext( file);
File source = new File( editor.getValue( "text()"));
include.addFile( new File( parent, source.getName()).getPath(), source, editor.getInteger( "@permission", permission));
} finally {
editor.popContext();
}
}
} finally {