# HG changeset patch # User Bob Rosenberg # Date 1287394434 -3600 # Node ID 66ff3e731c60b14db6e01b61c71799e048dbf1fb # Parent 7afa5fba0903df5765d73bcd7984dc49bb8e6f63 Sysdeftools additional support for merging misordered system definitions. More extensive validation. Minor bug fixes. Bash wrappers for perl scripts for unix installs. diff -r 7afa5fba0903 -r 66ff3e731c60 metatools/sysdeftools/group/bld.inf --- a/metatools/sysdeftools/group/bld.inf Mon Oct 18 10:23:52 2010 +0100 +++ b/metatools/sysdeftools/group/bld.inf Mon Oct 18 10:33:54 2010 +0100 @@ -63,6 +63,10 @@ ../joinsysdef.bat /epoc32/tools/sysdeftools/joinsysdef.bat ../rootsysdef.bat /epoc32/tools/sysdeftools/rootsysdef.bat +unixperlcmd /epoc32/tools/sysdeftools/checklinks +unixperlcmd /epoc32/tools/sysdeftools/joinsysdef +unixperlcmd /epoc32/tools/sysdeftools/rootsysdef + // Xalan-calling .bat/unix files (identical, can export from single file) ../joinandparesysdef.bat /epoc32/tools/sysdeftools/joinandparesysdef.bat ../filtering.bat /epoc32/tools/sysdeftools/filtering.bat diff -r 7afa5fba0903 -r 66ff3e731c60 metatools/sysdeftools/group/contents.xml --- a/metatools/sysdeftools/group/contents.xml Mon Oct 18 10:23:52 2010 +0100 +++ b/metatools/sysdeftools/group/contents.xml Mon Oct 18 10:33:54 2010 +0100 @@ -1,7 +1,7 @@ - + @@ -29,6 +29,10 @@ + + + + diff -r 7afa5fba0903 -r 66ff3e731c60 metatools/sysdeftools/group/unixperlcmd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metatools/sysdeftools/group/unixperlcmd Mon Oct 18 10:33:54 2010 +0100 @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Contributors: +# Nokia Corporation - initial contribution. +# +# Description: +# Perl wrapper for Unix + +BASEDIR=`dirname $0` +exec perl $BASEDIR/$0.pl $@ diff -r 7afa5fba0903 -r 66ff3e731c60 metatools/sysdeftools/joinsysdef.pl --- a/metatools/sysdeftools/joinsysdef.pl Mon Oct 18 10:23:52 2010 +0100 +++ b/metatools/sysdeftools/joinsysdef.pl Mon Oct 18 10:33:54 2010 +0100 @@ -276,17 +276,19 @@ } elsif($tag eq 'unit') { - foreach my $atr ('bldFile','mrp','base','proFile') + foreach my $atr ('bldFile','mrp','base') { my $link= $node->getAttribute($atr); if($link && !($link=~/^\//)) { $link= &abspath(File::Basename::dirname($file)."/$link"); - foreach my $a (keys %rootmap) { + foreach my $a (sort {length($b) - length($a)} keys(%rootmap)) { $link=~s,^$a,$rootmap{$a},ie; } # remove leading ./ which is used to indicate that paths should remain relative $link=~s,^\./([^/]),$1,; + # remove windows drive letter -- only allow paths on the same drive. Use root attribuite to build across drives / filesystems + $link=~s,^[a-z]:/,/,i; $node->setAttribute($atr,$link); } } diff -r 7afa5fba0903 -r 66ff3e731c60 metatools/sysdeftools/lib/joinsysdef-module.xsl --- a/metatools/sysdeftools/lib/joinsysdef-module.xsl Mon Oct 18 10:23:52 2010 +0100 +++ b/metatools/sysdeftools/lib/joinsysdef-module.xsl Mon Oct 18 10:33:54 2010 +0100 @@ -136,7 +136,8 @@ - + + diff -r 7afa5fba0903 -r 66ff3e731c60 metatools/sysdeftools/lib/mergesysdef-module.xsl --- a/metatools/sysdeftools/lib/mergesysdef-module.xsl Mon Oct 18 10:23:52 2010 +0100 +++ b/metatools/sysdeftools/lib/mergesysdef-module.xsl Mon Oct 18 10:33:54 2010 +0100 @@ -136,7 +136,7 @@ ERROR: Can only merge system models of the same rank - + @@ -220,9 +220,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Warning: Order of s in upstream document does not match order in downstream. The following s will be appended to the end of : + + + + + + + + + + + @@ -370,17 +406,37 @@ + + + + + + + + + + + + + + + + + Warning: Order of s in upstream + document does not match the order of the s in common in the downstream equivalent. Contents will not be properly merged: != + + - + @@ -389,7 +445,7 @@ - + @@ -398,6 +454,7 @@ + @@ -409,11 +466,11 @@ - - + + @@ -466,9 +523,16 @@ - - + + + + + + + + + @@ -554,9 +618,10 @@ - + + diff -r 7afa5fba0903 -r 66ff3e731c60 metatools/sysdeftools/lib/test-model.xsl --- a/metatools/sysdeftools/lib/test-model.xsl Mon Oct 18 10:23:52 2010 +0100 +++ b/metatools/sysdeftools/lib/test-model.xsl Mon Oct 18 10:33:54 2010 +0100 @@ -1,4 +1,7 @@ - + + + ]> + + + + + + + + Deprecated component should not be mandatory + + + + + with name "" + + has unexpected whitespace + + + + + is the same as the id + + + + + must not contain the underscore character (_) + + + The human-readable name for "" cannot be entirely lowercase + + + + + + + - + + + + + + should use "" + + + + should use "" instead of "" + + + + - + + + should have class "plugin" + + + + + + + should end with "..." or "..." + + + + should start with "..." + + + + + + @@ -111,8 +190,17 @@ + + Extension attribute ="" in namespace cannot be used without a proFile extention attribute + + + - Should avoid using extension attribute ="" in namespace + Use of extension attribute ="" in namespace is deprecated. Put contents in the "symbian: { ... }" section of / + + + + Extension attribute ="" must be removed. The attribute is deprecated and that is the default behaviour @@ -123,6 +211,21 @@ + + shai + api + AGPS + Headers + + + + _api + _shai + _info + _pub + _plat + test + plugin @@ -219,26 +322,37 @@ - Element "" is not valid in the context of "" + Element "" is not valid in the context of "" in metadata section - - "" has invalid parent "" + + "" has invalid parent "" + + + + : + units + + + - S60 Component "" has units. + S60 Component has units. - Component "" has units. + Component "" has units. @@ -255,22 +369,22 @@ - "" must match ID in linked file "" + "" must match ID in linked file "" - linked "" cannot be a link + linked "" cannot be a link - linked "" has duplicate attribute to linking document. Duplicate ignored. + linked "" has duplicate attribute to linking document. Duplicate ignored. - "" cannot have both link and content. Content ignored. + "" cannot have both link and content. Content ignored. - "" must match item in linked file "" + "" must match item in linked file "" @@ -293,6 +407,10 @@ + + + Collection has no level, despite levels "" being defined in "" + @@ -309,11 +427,62 @@ + + + + + Unrecognised configuration metadata type + + + Text content not valid in () + + + + + + Configuration metadata should have at least one fewer pick elements () than the number of units in "" () + + + + + + + + + + Configuration metadata must be empty + + + Configuration metadata must have a condition + + + + + + + + Configuration metadata must have a version + + + Configuration metadata version="" must match a unit within the containing "" + + + + + + + + + + + Empty attribute "" on "" + + @@ -325,13 +494,34 @@ - Duplicate ID: "" + Duplicate ID: "" - Undefined namespace for ID "" + Undefined namespace for ID "" + + + + ID "" contains reserved character "-" + + + + ID "" contains reserved character "." + + ID "" cannot begin with a digit + + + + + IDs should be entirely in lowercase () + + + + diff -r 7afa5fba0903 -r 66ff3e731c60 metatools/sysdeftools/rootsysdef.pl --- a/metatools/sysdeftools/rootsysdef.pl Mon Oct 18 10:23:52 2010 +0100 +++ b/metatools/sysdeftools/rootsysdef.pl Mon Oct 18 10:33:54 2010 +0100 @@ -252,6 +252,10 @@ my ($name,$path) = fileparse($_[0]); if($path eq '' && $name eq '') {return}; $path=~tr,\\,/,; + if ($path eq './') + { + return abs_path('.').$name; + } if( -e $path) { return abs_path($path)."/$name";