Package org.redline_rpm.payload

Examples of org.redline_rpm.payload.Contents$HeaderComparator


   * @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 {
View Full Code Here

TOP

Related Classes of org.redline_rpm.payload.Contents$HeaderComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.