You can subscribe to this list here.
2005 |
Jan
|
Feb
(1) |
Mar
(45) |
Apr
(150) |
May
(145) |
Jun
(150) |
Jul
(79) |
Aug
(313) |
Sep
(160) |
Oct
(309) |
Nov
(115) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(160) |
Feb
(144) |
Mar
(127) |
Apr
(48) |
May
(102) |
Jun
(54) |
Jul
(245) |
Aug
(94) |
Sep
(152) |
Oct
(162) |
Nov
(166) |
Dec
(740) |
2007 |
Jan
(752) |
Feb
(437) |
Mar
(328) |
Apr
(373) |
May
(569) |
Jun
(399) |
Jul
(369) |
Aug
(627) |
Sep
(100) |
Oct
(306) |
Nov
(166) |
Dec
(282) |
2008 |
Jan
(68) |
Feb
(145) |
Mar
(180) |
Apr
(160) |
May
(277) |
Jun
(229) |
Jul
(1188) |
Aug
(51) |
Sep
(97) |
Oct
(99) |
Nov
(95) |
Dec
(170) |
2009 |
Jan
(39) |
Feb
(73) |
Mar
(120) |
Apr
(121) |
May
(104) |
Jun
(262) |
Jul
(57) |
Aug
(171) |
Sep
(131) |
Oct
(88) |
Nov
(64) |
Dec
(83) |
2010 |
Jan
(55) |
Feb
(67) |
Mar
(124) |
Apr
(64) |
May
(130) |
Jun
(75) |
Jul
(164) |
Aug
(64) |
Sep
(44) |
Oct
(17) |
Nov
(43) |
Dec
(31) |
2011 |
Jan
(21) |
Feb
(10) |
Mar
(43) |
Apr
(46) |
May
(52) |
Jun
(71) |
Jul
(7) |
Aug
(16) |
Sep
(51) |
Oct
(14) |
Nov
(33) |
Dec
(15) |
2012 |
Jan
(12) |
Feb
(61) |
Mar
(129) |
Apr
(76) |
May
(70) |
Jun
(52) |
Jul
(29) |
Aug
(41) |
Sep
(32) |
Oct
(23) |
Nov
(38) |
Dec
(26) |
2013 |
Jan
(35) |
Feb
(37) |
Mar
(51) |
Apr
(15) |
May
(52) |
Jun
(15) |
Jul
(23) |
Aug
(21) |
Sep
(46) |
Oct
(69) |
Nov
(57) |
Dec
(26) |
2014 |
Jan
(5) |
Feb
(13) |
Mar
(17) |
Apr
(1) |
May
(5) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(16) |
Nov
(8) |
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(4) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Benjamin B. <bg...@us...> - 2005-08-05 07:55:26
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1099/Plugin/com/ibm/ecute/plugins/output Modified Files: CIMMOFOutputPlugin.java Log Message: flavors check Index: CIMMOFOutputPlugin.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/CIMMOFOutputPlugin.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- CIMMOFOutputPlugin.java 1 Jun 2005 12:37:31 -0000 1.7 +++ CIMMOFOutputPlugin.java 5 Aug 2005 07:55:14 -0000 1.8 @@ -187,7 +187,7 @@ } private void saveConfiguration(CIMMOFOutputDialog panel) { - path = panel.getPathText().getText(); + path = panel.getPathText().getText() + System.getProperty("file.separator"); completeClasses = panel.getFullClassesCheckBox().isSelected(); saveConfiguration(); } |
From: Benjamin B. <bg...@us...> - 2005-08-05 07:55:24
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1099/Plugin/com/ibm/ecute/rsa/core/internal/properties Modified Files: QualifiersPropertySection.java CheckAndRepair.java FlavorsHelper.java Log Message: flavors check Index: FlavorsHelper.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties/FlavorsHelper.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- FlavorsHelper.java 28 Jul 2005 17:59:51 -0000 1.6 +++ FlavorsHelper.java 5 Aug 2005 07:55:14 -0000 1.7 @@ -22,6 +22,7 @@ import org.eclipse.uml2.Constraint; import org.eclipse.uml2.Element; import org.eclipse.uml2.Model; +import org.eclipse.uml2.MultiplicityElement; import org.eclipse.uml2.NamedElement; import org.eclipse.uml2.OpaqueExpression; import org.eclipse.uml2.Operation; @@ -956,12 +957,23 @@ } if(attribute != null){ - if(attribute.isStatic()){ - return(new EffectiveInheritedValue("true", (Class)parents.get(j))); + if(override(attribute) || !override(attribute) && j == parents.size()-1){ + if(attribute.isStatic()){ + return(new EffectiveInheritedValue("true", (Class)parents.get(j))); + } else { + return(new EffectiveInheritedValue("false", (Class)parents.get(j))); + } } if(!override(attribute) && j != parents.size()-1){ return null; } + +// if(attribute.isStatic()){ +// return(new EffectiveInheritedValue("true", (Class)parents.get(j))); +// } +// if(!override(attribute) && j != parents.size()-1){ +// return null; +// } } } @@ -1154,6 +1166,290 @@ return null; } + public static String defaultValue(String qualifierName){ + + QualifiersList defaultQualifierNames=null; + try{ + defaultQualifierNames = EcuteEclipsePlugin.getDefault().getQualifiersList(); + }catch (Exception e){ + e.printStackTrace(); + } + Vector defaultQualifiers = defaultQualifierNames.GetElements(); + + //make a copy of the qualifiers list to remove the qualifiers already displayed + ArrayList allAvailableQualifers = new ArrayList(); + for(int i=0; i < defaultQualifiers.size(); i++){ + allAvailableQualifers.add(defaultQualifiers.get(i)); + } + + for(Iterator iterator1 = allAvailableQualifers.iterator(); iterator1.hasNext();) + { + Qualifier qualifier = (Qualifier)iterator1.next(); + if(qualifier.name.equalsIgnoreCase(qualifierName)){ + return qualifier.defaultValue; + } + } + + return null; + } + + public static String qualifierValue(NamedElement element, String qualifierName){ + + Stereotype cimStereotype = element.getAppliedStereotype("CIM::Qualifiers"); + List qualifierNames = (List) element.getValue(cimStereotype, "QualifierName"); + List qualifierValues = (List) element.getValue(cimStereotype, "QualifierValue"); + + for(int i = 0; i < qualifierNames.size(); i++){ + if(qualifierName.equalsIgnoreCase((String)qualifierNames.get(i))){ + return (String)qualifierValues.get(i); + } + } + + if(qualifierName.equalsIgnoreCase("Abstract")){ + if(element instanceof Class){ + if(((Class)element).isAbstract()){ + return "true"; + } else { + return "false"; + } + } else { + return null; + } + } + + else if(qualifierName.equalsIgnoreCase("Aggregate")){ + if(element instanceof Property){ + Property prop = (Property)element; + Property oppositeProp = null; + boolean isOwnedEnd = propertyIsOwnedEnd(prop); + // get the property of the other association end + if (isOwnedEnd){ + AssociationClass parentClass = (AssociationClass)prop.getOwner(); + List ends = parentClass.getOwnedEnds(); + if ((Property)ends.get(0) == prop){ + oppositeProp = (Property)ends.get(1); + } + if ((Property)ends.get(1) == prop){ + oppositeProp = (Property)ends.get(0); + } + + if(oppositeProp.getAggregation().getValue()== AggregationKind.SHARED + || oppositeProp.getAggregation().getValue()== AggregationKind.COMPOSITE){ + return "true"; + } else { + return "false"; + } + } else { + return null; + } + } else { + return null; + } + } + + else if(qualifierName.equalsIgnoreCase("Association")){ + if(element instanceof AssociationClass){ + return "true"; + } else if(element instanceof Class){ + return "false"; + } else { + return null; + } + } + + else if(qualifierName.equalsIgnoreCase("Aggregation")){ + if(element instanceof AssociationClass){ + AssociationClass assocClass = (AssociationClass)element; + EList ends = assocClass.getOwnedEnds(); + Iterator iter = ends.iterator(); + while(iter.hasNext()){ + Property prop = (Property)iter.next(); + if(prop.getAggregation().getValue()== AggregationKind.SHARED || + prop.getAggregation().getValue()== AggregationKind.COMPOSITE){ + return "true"; + } + } + return "false"; + } else { + return null; + } + } + + else if(qualifierName.equalsIgnoreCase("Composition")){ + if(element instanceof AssociationClass){ + AssociationClass assocClass = (AssociationClass)element; + EList ends = assocClass.getOwnedEnds(); + Iterator iter = ends.iterator(); + while(iter.hasNext()){ + Property prop = (Property)iter.next(); + if(prop.getAggregation().getValue() == AggregationKind.COMPOSITE){ + return "true"; + } + } + return "false"; + } else { + return null; + } + } + + else if(qualifierName.equalsIgnoreCase("Deprecated")){ + Stereotype stereo = element.getAppliedStereotype("CIM::Deprecated"); + if(stereo != null){ + return (String)element.getValue(stereo, "Value"); + } else { + return "null"; + } + } + + else if(qualifierName.equalsIgnoreCase("Description")){ + EList list = element.getOwnedComments(); + Iterator it = list.iterator(); + while (it.hasNext()){ + Comment comment = (Comment)it.next(); + Stereotype stereo = comment.getApplicableStereotype("Default::Documentation"); + if(stereo != null){ + return comment.getBody(); + } + } + return "null"; + } + + else if(qualifierName.equalsIgnoreCase("In")){ + if(element instanceof Parameter){ + ParameterDirectionKind kind = ((Parameter)element).getDirection(); + if(kind.getValue() == ParameterDirectionKind.IN || kind.getValue() == ParameterDirectionKind.INOUT){ + return "true"; + } else { + return "false"; + } + } else { + return null; + } + } + + else if(qualifierName.equalsIgnoreCase("Out")){ + if(element instanceof Parameter){ + ParameterDirectionKind kind = ((Parameter)element).getDirection(); + if(kind.getValue() == ParameterDirectionKind.OUT || kind.getValue() == ParameterDirectionKind.INOUT){ + return "true"; + } else { + return "false"; + } + } else { + return null; + } + } + + else if(qualifierName.equalsIgnoreCase("Key")){ + if(element instanceof Property){ + Stereotype stereo = element.getAppliedStereotype("CIM::Key"); + if(stereo != null){ + return "true"; + } else { + return "false"; + } + } else { + return null; + } + } + + else if(qualifierName.equalsIgnoreCase("Min") || qualifierName.equalsIgnoreCase("Max")){ + + if(element instanceof Property){ + Property prop = (Property)element; + Property oppositeProp = null; + boolean isOwnedEnd = propertyIsOwnedEnd(prop); + if(isOwnedEnd){ + if(((AssociationClass)prop.getOwner()).getOwnedEnds().contains(prop)){ + if(qualifierName.equalsIgnoreCase("Max")){ + String value = new Integer(prop.getUpper()).toString(); + if(value.equalsIgnoreCase("-1")){ + value = "null"; + } + return value; + } + else if(qualifierName.equalsIgnoreCase("Min")){ + String value = new Integer(prop.getLower()).toString(); + if(value.equalsIgnoreCase("-1")){ + value = "0"; + } + return value; + } + } else { + return null; + } + } else { + return null; + } + } else { + return null; + } + } + + else if(qualifierName.equalsIgnoreCase("Octetstring")){ + if(element instanceof Parameter || element instanceof Property + || element instanceof Operation){ + String octetstring = "octetstring"; + String octetstring_array = "octetstring[]"; + Type type = null; + if(element instanceof Parameter){ + type = ((Parameter)element).getType(); + } else if(element instanceof Property){ + type = ((Property)element).getType(); + } else { + Operation op = (Operation)element; + if(op.getReturnResult("ReturnType") != null){ + type = op.getReturnResult("ReturnType").getType(); + } + } + if(type != null){ + if(type.getName().equalsIgnoreCase(octetstring) || type.getName().equalsIgnoreCase(octetstring_array)){ + return "true"; + } else { + return "false"; + } + } else { + return "false"; + } + } else { + return null; + } + } + + else if(qualifierName.equalsIgnoreCase("Static")){ + if(element instanceof Property){ + if(((Property)element).isStatic()){ + return "true"; + } else { + return "false"; + } + } else if(element instanceof Operation){ + if(((Operation)element).isStatic()){ + return "true"; + } else { + return "false"; + } + } else { + return null; + } + } + + else if(qualifierName.equalsIgnoreCase("Write")){ + if(element instanceof Property){ + if(!(((Property)element).isReadOnly())){ + return "true"; + } else { + return "false"; + } + } else { + return null; + } + } + + return null; + + } + private static boolean propertyIsOwnedEnd(Property prop){ boolean isOwnedEnd = false; @@ -1234,7 +1530,7 @@ return false; } - private static boolean equalMethods(Operation method1, Operation method2){ + public static boolean equalMethods(Operation method1, Operation method2){ if(method1 == null || method2 == null){ return false; @@ -1271,14 +1567,21 @@ EditingDomain editingDomain = UMLModeler.getEditingDomain(); ArrayList applicableQualifiers = getApplicableQualifiers(element); // remove qualifiers with Restricted flavor + boolean removed = false; for(int i = 0; i < applicableQualifiers.size(); i++){ + if(removed){ + i--; + removed = false; + } Qualifier qualifier = (Qualifier)applicableQualifiers.get(i); if(qualifier.RestrictedFlavor){ applicableQualifiers.remove(i); + removed = true; } // remove qualifiers with Enable ToSubclass flavor if(skipEnableOverride && !qualifier.DissableOverrideFlavor && !qualifier.RestrictedFlavor){ applicableQualifiers.remove(i); + removed = true; } } @@ -1293,6 +1596,10 @@ String qualifierValue = null; if(effectiveInheritedValue(element, qualifierName) != null){ qualifierValue = effectiveInheritedValue(element, qualifierName).getValue(); + } else { + if(!(element instanceof Class && ((Class)element).getGenerals().size() == 0)){ + qualifierValue = defaultValue(qualifierName); + } } if(qualifierName.equalsIgnoreCase("Min") && qualifierValue != null){ @@ -1406,7 +1713,7 @@ } } - private ArrayList getApplicableQualifiers(NamedElement element){ + public ArrayList getApplicableQualifiers(NamedElement element){ String elementType = getNamedElementType(element); @@ -1430,6 +1737,18 @@ return applicableQualifers; } + public ArrayList getApplicableDisableOverrideQualifiers(NamedElement element){ + ArrayList list = getApplicableQualifiers(element); + ArrayList returnList = new ArrayList(); + for(int i = 0; i < list.size(); i++){ + Qualifier qualifier = (Qualifier)list.get(i); + if(qualifier.DissableOverrideFlavor && !qualifier.name.equalsIgnoreCase("Key")){ + returnList.add(qualifier); + } + } + return returnList; + } + public void mapQualifierToModel(Element element, String qualifierName, String newValue){ // AGGREGATION, COMPOSITION @@ -1456,7 +1775,7 @@ prop2.setAggregation(AggregationKind.NONE_LITERAL); // just to be sure } } - + // IN, OUT } else if(element instanceof Parameter && (qualifierName.equalsIgnoreCase("In")||qualifierName.equalsIgnoreCase("Out"))){ Index: CheckAndRepair.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties/CheckAndRepair.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CheckAndRepair.java 28 Jul 2005 17:59:51 -0000 1.1 +++ CheckAndRepair.java 5 Aug 2005 07:55:14 -0000 1.2 @@ -10,9 +10,13 @@ import org.eclipse.uml2.Class; import org.eclipse.uml2.Model; import org.eclipse.uml2.NamedElement; +import org.eclipse.uml2.Operation; import org.eclipse.uml2.Package; +import org.eclipse.uml2.Parameter; import org.eclipse.uml2.Property; +import com.ibm.ecute.Qualifiers.Qualifier; +import com.ibm.ecute.rsa.core.internal.dialogs.ProgressLogDialog; import com.ibm.ecute.utils.License; /** @@ -41,16 +45,85 @@ this.model = model; this.flavorsHelper = new FlavorsHelper(model); } + + public void checkAll(ProgressLogDialog frame){ + //applyAllNativeInheritedValues(frame); + checkDisableOverrideQualifiers(frame); + } - public void applyAllNativeInheritedValues(NamedElement element){ - ArrayList orderedModelClasses = getOrderedModelClasses(element); + public void checkAndRepairAll(ProgressLogDialog frame){ + applyAllNativeInheritedValues(frame); + //checkDisableOverrideQualifiers(frame); + } + + public void applyAllNativeInheritedValues(ProgressLogDialog frame){ + + frame.addLine2Log("*******************************************************"); + frame.addLine2Log("Propagating all native inherited values"); + frame.addLine2Log("--------------------------------------------------"); + frame.addLine2Log(""); + + ArrayList orderedModelClasses = getOrderedModelClasses(); for(int i = 0; i < orderedModelClasses.size(); i++){ flavorsHelper.applyNativeInheritedValues((NamedElement)orderedModelClasses.get(i), true); } + + frame.addLine2Log("--> complete"); + frame.addLine2Log(""); + } - private ArrayList getOrderedModelClasses(NamedElement element){ - ArrayList classes = getAllModelClasses(element); + public void checkDisableOverrideQualifiers(ProgressLogDialog frame){ + + frame.addLine2Log("***************************************************************************"); + frame.addLine2Log("Checking ToSubclass DisableOverride qualifiers"); + frame.addLine2Log("---------------------------------------------------------"); + + // get all model base classes + ArrayList orderedModelClasses = getOrderedModelClasses(); + ArrayList modelBaseClasses = new ArrayList(); + for(int i = 0; i < orderedModelClasses.size(); i++){ + Class tempClass = (Class)orderedModelClasses.get(i); + if(tempClass.getGenerals().size() == 0){ + modelBaseClasses.add(tempClass); + } + } + ArrayList modelBaseAssociationClasses = new ArrayList(); + for(int i = 0; i < orderedModelClasses.size(); i++){ + if(orderedModelClasses.get(i) instanceof AssociationClass){ + AssociationClass tempClass = (AssociationClass)orderedModelClasses.get(i); + if(tempClass.getGenerals().size() == 0){ + modelBaseAssociationClasses.add(tempClass); + } + } + } + + // check classes + checkDisableOverrideClasses(frame, modelBaseClasses, orderedModelClasses); + + // check associationClasses + checkDisableOverrideAssociationClasses(frame, modelBaseAssociationClasses, orderedModelClasses); + + // check references + checkDisableOverrideReferences(frame, orderedModelClasses); + + // check properties + checkDisableOverrideProperties(frame, orderedModelClasses); + + // check methods + checkDisableOverrideMethods(frame, orderedModelClasses); + + // check parameters + checkDisableOverrideParameters(frame, orderedModelClasses); + + frame.addLine2Log(""); + frame.addLine2Log("--> DisableOverride test complete"); + frame.addLine2Log(""); + frame.addLine2Log("***************************************************************************"); + } + + private ArrayList getOrderedModelClasses(){ + ArrayList classes = getAllModelClasses(); ArrayList orderedClasses = new ArrayList(classes.size()); // get all classes without parents for(int i = 0; i < classes.size(); i++){ @@ -61,11 +134,12 @@ ArrayList tempList = orderedClasses; + // get child classes of the parent classes while(orderedClasses.size() < classes.size()){ ArrayList newOrderedClasses = new ArrayList(); for(int i = 0; i < tempList.size(); i++){ Class class_ = (Class)tempList.get(i); - ArrayList childClasses = getAllChildClasses(class_); + ArrayList childClasses = getAllChildClasses(class_, classes, true); newOrderedClasses.addAll(childClasses); } orderedClasses.addAll(newOrderedClasses); @@ -75,7 +149,7 @@ return orderedClasses; } - private ArrayList getAllModelClasses(NamedElement element){ + private ArrayList getAllModelClasses(){ ArrayList classes = new ArrayList(); // this call is usually used to modify the ownedMembers in the model @@ -109,7 +183,7 @@ ArrayList childClasses = new ArrayList(); // get model classes - ArrayList modelClasses = getAllModelClasses((NamedElement)class_); + ArrayList modelClasses = getAllModelClasses(); if(modelClasses.size() <= 0){ return null; } @@ -140,6 +214,38 @@ return childClasses; } + public ArrayList getAllChildClasses(Class class_, ArrayList modelClasses, boolean remove){ + + ArrayList childClasses = new ArrayList(); + + ArrayList currentChildren = new ArrayList(); + currentChildren.add(class_); + + while(currentChildren.size() > 0){ + String childClassName = ((Class)currentChildren.get(0)).getName(); + int n = modelClasses.size(); + for(int j = 0; j < n; j++){ + if(((Class)modelClasses.get(j)).getGenerals().size() > 0 && + (Class)((Class)modelClasses.get(j)).getGenerals().get(0) != null){ + String className = ((Class)((Class)modelClasses.get(j)).getGenerals().get(0)).getName(); + if(className.equalsIgnoreCase(childClassName)){ + currentChildren.add(modelClasses.get(j)); + childClasses.add(modelClasses.get(j)); + //m++; + if(remove){ + modelClasses.remove(j); + j--; n--; + } + } + } + } + currentChildren.remove(0); + } + + childClasses.trimToSize(); + return childClasses; + } + public ArrayList getOverrideSubProperties(Property property){ ArrayList subproperties = new ArrayList(); // check if property is a class property or an association end @@ -163,12 +269,472 @@ // the override qualifiers set if(FlavorsHelper.override(subProperty)){ subproperties.add(subProperty); + } else { + return subproperties; } } } return subproperties; } + + public ArrayList getOverrideSubMethods(Operation operation){ + ArrayList submethods = new ArrayList(); + + // get subclasses of the class which contains the property + ArrayList subclasses = getAllChildClasses((Class)operation.getOwner()); + + // check if subclasses define the searched method + for(int i = 0; i < subclasses.size(); i++){ + Class subClass = (Class)subclasses.get(i); + Operation method; + method = subClass.getOwnedOperation(operation.getName()); + + if(method != null){ + // if the subclass defines the method then check if the subMethod has + // the override qualifier set + if(FlavorsHelper.override(method)){ + submethods.add(method); + } else { + return submethods; + } + } + } + return submethods; + } + + public ArrayList getOverrideSubParameters(Parameter parameter){ + ArrayList subparameters = new ArrayList(); + + // get the owning method + Operation operation = (Operation)parameter.getOwner(); + + // get subclasses of the class which contains the property + ArrayList subclasses = getAllChildClasses((Class)operation.getOwner()); + + + // check if subclasses define the searched parameter + for(int i = 0; i < subclasses.size(); i++){ + Class subClass = (Class)subclasses.get(i); + Operation method; + method = subClass.getOwnedOperation(operation.getName()); + + if(method != null){ + // if the subclass defines the method then check if the subMethod has + // the override qualifier set + if(FlavorsHelper.override(method) && FlavorsHelper.equalMethods(operation, method)){ + subparameters.add(method.getOwnedParameter(parameter.getName())); + } else { + return subparameters; + } + } + } + return subparameters; + } + + private void checkDisableOverrideClasses(ProgressLogDialog frame, ArrayList modelBaseClasses, ArrayList orderedModelClasses){ + ArrayList disableOverrideClassQualifiers = new ArrayList(); + boolean firstClass = true; + boolean classErrors = false; + for(int i = 0; i < modelBaseClasses.size(); i++){ + Class thisClass = (Class)modelBaseClasses.get(i); + if(disableOverrideClassQualifiers.size() == 0){ + disableOverrideClassQualifiers = flavorsHelper.getApplicableDisableOverrideQualifiers(thisClass); + if(disableOverrideClassQualifiers.size() == 0){ + i = modelBaseClasses.size(); + } + } + if(disableOverrideClassQualifiers.size() > 0){ + ArrayList childClasses = getAllChildClasses(thisClass, orderedModelClasses, false); + for(int j = 0; j < disableOverrideClassQualifiers.size(); j++){ + Qualifier qualifier = (Qualifier)disableOverrideClassQualifiers.get(j); + String valueA = FlavorsHelper.qualifierValue(thisClass, qualifier.name); + boolean firstChild = true; + for(int k = 0; k < childClasses.size(); k++){ + Class class_ = (Class)childClasses.get(k); + String valueB = FlavorsHelper.qualifierValue(class_, qualifier.name); + if(valueA != null && valueB != null && !valueA.equalsIgnoreCase(valueB)|| + valueA == null && valueB != null){ + + if(firstClass){ + frame.addLine2Log(""); + frame.addLine2Log("Classes:"); + firstClass = false; + classErrors = true; + } + + if(firstChild){ + frame.addLine2Log(""); + frame.addLine2Log("The disable override qualifer " + qualifier.name + " defined in"); + frame.addLine2Log(((NamedElement)thisClass.getOwner()).getName() + "::" + thisClass.getName()+ " is overwritten in class "); + firstChild = false; + } + frame.addLine2Log(" - "+ ((NamedElement)class_.getOwner()).getName() + "::" + class_.getName()); + } + } + } + } + } + + if(!classErrors){ + frame.addLine2Log(""); + frame.addLine2Log("Classes: OK"); + } else { + frame.updateImage(frame.getWarningImage()); + } + } + + private void checkDisableOverrideAssociationClasses(ProgressLogDialog frame, ArrayList modelBaseAssociationClasses, ArrayList orderedModelClasses){ + ArrayList disableOverrideAssociationClassQualifiers = new ArrayList(); + boolean firstClass = true; + boolean classErrors = false; + for(int i = 0; i < modelBaseAssociationClasses.size(); i++){ + AssociationClass thisClass = (AssociationClass)modelBaseAssociationClasses.get(i); + if(disableOverrideAssociationClassQualifiers.size() == 0){ + disableOverrideAssociationClassQualifiers = flavorsHelper.getApplicableDisableOverrideQualifiers(thisClass); + if(disableOverrideAssociationClassQualifiers.size() == 0){ + i = modelBaseAssociationClasses.size(); + } + } + if(disableOverrideAssociationClassQualifiers.size() > 0){ + ArrayList childClasses = getAllChildClasses(thisClass, orderedModelClasses, false); + for(int j = 0; j < disableOverrideAssociationClassQualifiers.size(); j++){ + Qualifier qualifier = (Qualifier)disableOverrideAssociationClassQualifiers.get(j); + String valueA = FlavorsHelper.qualifierValue(thisClass, qualifier.name); + boolean firstChild = true; + for(int k = 0; k < childClasses.size(); k++){ + AssociationClass class_ = (AssociationClass)childClasses.get(k); + String valueB = FlavorsHelper.qualifierValue(class_, qualifier.name); + if(valueA != null && valueB != null && !valueA.equalsIgnoreCase(valueB) || + valueA == null && valueB != null){ + + if(firstClass){ + frame.addLine2Log(""); + frame.addLine2Log("AssociationClasses:"); + firstClass = false; + classErrors = true; + } + + if(firstChild){ + frame.addLine2Log(""); + frame.addLine2Log("The disable override qualifer " + qualifier.name + " defined in"); + frame.addLine2Log(((NamedElement)thisClass.getOwner()).getName() + "::" + thisClass.getName()+ " is overwritten in associationClass "); + firstChild = false; + } + frame.addLine2Log(" - "+ ((NamedElement)class_.getOwner()).getName() + "::" + class_.getName()); + } + } + } + } + } + + if(!classErrors){ + frame.addLine2Log(""); + frame.addLine2Log("AssociationClasses: OK"); + } else { + frame.updateImage(frame.getWarningImage()); + } + } + + private void checkDisableOverrideReferences(ProgressLogDialog frame, ArrayList orderedModelClasses){ + + ArrayList disableOverrideReferenceQualifiers = new ArrayList(); + ArrayList checkedSubclassReferences = new ArrayList(); + boolean firstReference = true; + boolean referenceErrors = false; + for(int i = 0; i < orderedModelClasses.size(); i++){ + if(orderedModelClasses.get(i) instanceof AssociationClass){ + AssociationClass thisClass = (AssociationClass)orderedModelClasses.get(i); + List classReferences = thisClass.getOwnedEnds(); + for(int m = 0; m < classReferences.size(); m++){ + Property property = (Property)classReferences.get(m); + if(disableOverrideReferenceQualifiers.size() == 0){ + disableOverrideReferenceQualifiers = flavorsHelper.getApplicableDisableOverrideQualifiers(property); + if(disableOverrideReferenceQualifiers.size() == 0){ + i = orderedModelClasses.size(); + } + } + if(disableOverrideReferenceQualifiers.size() > 0 && !alreadyChecked(property, checkedSubclassReferences)){ + ArrayList childProperties = getOverrideSubProperties(property); + boolean firstQualifier = true; + for(int j = 0; j < disableOverrideReferenceQualifiers.size(); j++){ + Qualifier qualifier = (Qualifier)disableOverrideReferenceQualifiers.get(j); + String valueA = FlavorsHelper.qualifierValue(property, qualifier.name); + boolean firstChild = true; + for(int k = 0; k < childProperties.size(); k++){ + Property childProperty = (Property)childProperties.get(k); + if(firstQualifier){ + checkedSubclassReferences.add(childProperty); + } + String valueB = FlavorsHelper.qualifierValue(childProperty, qualifier.name); + if(valueA != null && valueB != null && !valueA.equalsIgnoreCase(valueB)|| + valueA == null && valueB != null){ + + if(firstReference){ + frame.addLine2Log(""); + frame.addLine2Log("AssociationEnds:"); + firstReference = false; + referenceErrors = true; + } + + if(firstChild){ + frame.addLine2Log(""); + frame.addLine2Log("The disable override qualifer " + qualifier.name + " defined in"); + frame.addLine2Log(((NamedElement)property.getOwner().getOwner()).getName() + "::" + + ((NamedElement)property.getOwner()).getName() + "::" + property.getName() + " is overwritten in associationEnd "); + firstChild = false; + } + frame.addLine2Log(" - " + ((NamedElement)childProperty.getOwner().getOwner()).getName() + "::" + + ((NamedElement)childProperty.getOwner()).getName() + "::" + childProperty.getName()); + } + } + firstQualifier = false; + } + } + } + } + } + + if(!referenceErrors){ + frame.addLine2Log(""); + frame.addLine2Log("AssociationEnds: OK"); + } else { + frame.updateImage(frame.getWarningImage()); + } + + } + + private void checkDisableOverrideProperties(ProgressLogDialog frame, ArrayList orderedModelClasses){ + + ArrayList disableOverridePropertyQualifiers = new ArrayList(); + ArrayList checkedSubclassProperties = new ArrayList(); + boolean firstProperty = true; + boolean propertyErrors = false; + for(int i = 0; i < orderedModelClasses.size(); i++){ + Class thisClass = (Class)orderedModelClasses.get(i); + List classProperties = thisClass.getOwnedAttributes(); + for(int m = 0; m < classProperties.size(); m++){ + Property property = (Property)classProperties.get(m); + if(disableOverridePropertyQualifiers.size() == 0){ + disableOverridePropertyQualifiers = flavorsHelper.getApplicableDisableOverrideQualifiers(property); + if(disableOverridePropertyQualifiers.size() == 0){ + i = orderedModelClasses.size(); + } + } + if(disableOverridePropertyQualifiers.size() > 0 && !alreadyChecked(property, checkedSubclassProperties)){ + ArrayList childProperties = getOverrideSubProperties(property); + boolean firstQualifier = true; + for(int j = 0; j < disableOverridePropertyQualifiers.size(); j++){ + Qualifier qualifier = (Qualifier)disableOverridePropertyQualifiers.get(j); + String valueA = FlavorsHelper.qualifierValue(property, qualifier.name); + boolean firstChild = true; + for(int k = 0; k < childProperties.size(); k++){ + Property childProperty = (Property)childProperties.get(k); + if(firstQualifier){ + checkedSubclassProperties.add(childProperty); + } + String valueB = FlavorsHelper.qualifierValue(childProperty, qualifier.name); + if(valueA != null && valueB != null && !valueA.equalsIgnoreCase(valueB)|| + valueA == null && valueB != null){ + + if(firstProperty){ + frame.addLine2Log(""); + frame.addLine2Log("Properties:"); + firstProperty = false; + propertyErrors = true; + } + + if(firstChild){ + frame.addLine2Log(""); + frame.addLine2Log("The disable override qualifer " + qualifier.name + " defined in"); + frame.addLine2Log(((NamedElement)property.getOwner().getOwner()).getName() + "::" + + ((NamedElement)property.getOwner()).getName() + "::" + property.getName() + " is overwritten in property "); + firstChild = false; + } + frame.addLine2Log(" - " + ((NamedElement)childProperty.getOwner().getOwner()).getName() + "::" + + ((NamedElement)childProperty.getOwner()).getName() + "::" + childProperty.getName()); + } + } + firstQualifier = false; + } + } + } + } + + if(!propertyErrors){ + frame.addLine2Log(""); + frame.addLine2Log("Properties: OK"); + } else { + frame.updateImage(frame.getWarningImage()); + } + + } + + private void checkDisableOverrideMethods(ProgressLogDialog frame, ArrayList orderedModelClasses){ + + ArrayList disableOverrideMethodQualifiers = new ArrayList(); + ArrayList checkedSubclassMethods = new ArrayList(); + boolean firstMethod = true; + boolean methodErrors = false; + for(int i = 0; i < orderedModelClasses.size(); i++){ + Class thisClass = (Class)orderedModelClasses.get(i); + List classMethods = thisClass.getOwnedOperations(); + for(int m = 0; m < classMethods.size(); m++){ + Operation operation = (Operation)classMethods.get(m); + if(disableOverrideMethodQualifiers.size() == 0){ + disableOverrideMethodQualifiers = flavorsHelper.getApplicableDisableOverrideQualifiers(operation); + if(disableOverrideMethodQualifiers.size() == 0){ + i = orderedModelClasses.size(); + } + } + if(disableOverrideMethodQualifiers.size() > 0 && !alreadyChecked(operation, checkedSubclassMethods)){ + ArrayList childMethods = getOverrideSubMethods(operation); + boolean firstQualifier = true; + for(int j = 0; j < disableOverrideMethodQualifiers.size(); j++){ + Qualifier qualifier = (Qualifier)disableOverrideMethodQualifiers.get(j); + String valueA = FlavorsHelper.qualifierValue(operation, qualifier.name); + boolean firstChild = true; + for(int k = 0; k < childMethods.size(); k++){ + Operation childMethod = (Operation)childMethods.get(k); + if(firstQualifier){ + checkedSubclassMethods.add(childMethod); + } + String valueB = FlavorsHelper.qualifierValue(childMethod, qualifier.name); + if(valueA != null && valueB != null && !valueA.equalsIgnoreCase(valueB)|| + valueA == null && valueB != null){ + + if(firstMethod){ + frame.addLine2Log(""); + frame.addLine2Log("Methods:"); + firstMethod = false; + methodErrors = true; + } + + if(firstChild){ + frame.addLine2Log(""); + frame.addLine2Log("The disable override qualifer " + qualifier.name + " defined in"); + frame.addLine2Log(((NamedElement)operation.getOwner().getOwner()).getName() + "::" + + ((NamedElement)operation.getOwner()).getName() + "::" + operation.getName() + " is overwritten in method "); + firstChild = false; + } + frame.addLine2Log(" - " + ((NamedElement)childMethod.getOwner().getOwner()).getName() + "::" + + ((NamedElement)childMethod.getOwner()).getName() + "::" + childMethod.getName()); + } + } + firstQualifier = false; + } + } + } + } + + if(!methodErrors){ + frame.addLine2Log(""); + frame.addLine2Log("Methods: OK"); + } else { + frame.updateImage(frame.getWarningImage()); + } + } + + private void checkDisableOverrideParameters(ProgressLogDialog frame, ArrayList orderedModelClasses){ + + ArrayList disableOverrideParameterQualifiers = new ArrayList(); + ArrayList checkedSubclassParameters = new ArrayList(); + boolean firstParameter = true; + boolean parameterErrors = false; + for(int i = 0; i < orderedModelClasses.size(); i++){ + Class thisClass = (Class)orderedModelClasses.get(i); + List classMethods = thisClass.getOwnedOperations(); + for(int m = 0; m < classMethods.size(); m++){ + Operation operation = (Operation)classMethods.get(m); + List methodParameters = operation.getOwnedParameters(); + for(int n = 0; n < methodParameters.size(); n++){ + Parameter parameter = (Parameter)methodParameters.get(n); + if(disableOverrideParameterQualifiers.size() == 0){ + disableOverrideParameterQualifiers = flavorsHelper.getApplicableDisableOverrideQualifiers(parameter); + if(disableOverrideParameterQualifiers.size() == 0){ + i = orderedModelClasses.size(); + } + } + if(disableOverrideParameterQualifiers.size() > 0 && !alreadyChecked(parameter, checkedSubclassParameters)){ + ArrayList childParameters = getOverrideSubParameters(parameter); + boolean firstQualifier = true; + for(int j = 0; j < disableOverrideParameterQualifiers.size(); j++){ + Qualifier qualifier = (Qualifier)disableOverrideParameterQualifiers.get(j); + String valueA = FlavorsHelper.qualifierValue(parameter, qualifier.name); + boolean firstChild = true; + for(int k = 0; k < childParameters.size(); k++){ + Parameter childParameter = (Parameter)childParameters.get(k); + if(firstQualifier){ + checkedSubclassParameters.add(childParameter); + } + String valueB = FlavorsHelper.qualifierValue(childParameter, qualifier.name); + if(valueA != null && valueB != null && !valueA.equalsIgnoreCase(valueB)|| + valueA == null && valueB != null){ + + if(firstParameter){ + frame.addLine2Log(""); + frame.addLine2Log("Method parameters:"); + firstParameter = false; + parameterErrors = true; + } + + if(firstChild){ + frame.addLine2Log(""); + frame.addLine2Log("The disable override qualifer " + qualifier.name + " defined in"); + frame.addLine2Log(((NamedElement)parameter.getOwner().getOwner().getOwner()).getName() + "::" + + ((NamedElement)parameter.getOwner().getOwner()).getName() + "::" + + ((NamedElement)parameter.getOwner()).getName() + "::" + parameter.getName() + " is overwritten in parameter "); + firstChild = false; + } + frame.addLine2Log(" - " + ((NamedElement)childParameter.getOwner().getOwner().getOwner()).getName() + "::" + + ((NamedElement)childParameter.getOwner().getOwner()).getName() + "::" + + ((NamedElement)childParameter.getOwner()).getName() + "::" + childParameter.getName()); + } + } + firstQualifier = false; + } + } + } + } + } + + if(!parameterErrors){ + frame.addLine2Log(""); + frame.addLine2Log("Method parameters: OK"); + } else { + frame.updateImage(frame.getWarningImage()); + } + } + + private boolean alreadyChecked(NamedElement element, ArrayList checkedSubclassElements){ + + if(element instanceof Property){ + Property property = (Property)element; + for(int i = 0; i < checkedSubclassElements.size(); i++){ + if(property.equals((Property)checkedSubclassElements.get(i))){ + return true; + } + } + } else if(element instanceof Operation){ + Operation operation = (Operation)element; + for(int i = 0; i < checkedSubclassElements.size(); i++){ + if(operation.equals((Operation)checkedSubclassElements.get(i))){ + return true; + } + } + } else if(element instanceof Parameter){ + Parameter parameter = (Parameter)element; + for(int i = 0; i < checkedSubclassElements.size(); i++){ + if(parameter.equals((Parameter)checkedSubclassElements.get(i))){ + return true; + } + } + } + + + return false; + } + public boolean isReference(NamedElement element){ boolean isRef = false; Index: QualifiersPropertySection.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties/QualifiersPropertySection.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- QualifiersPropertySection.java 28 Jul 2005 17:59:51 -0000 1.24 +++ QualifiersPropertySection.java 5 Aug 2005 07:55:14 -0000 1.25 @@ -14,6 +14,8 @@ import java.util.Locale; import java.util.Vector; +import javax.swing.UIManager; + import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.emf.common.notify.Notification; @@ -58,6 +60,7 @@ import com.ibm.ecute.Qualifiers.Qualifier; import com.ibm.ecute.Qualifiers.QualifiersList; import com.ibm.ecute.rsa.core.internal.dialogs.EditQualifiersDialog; +import com.ibm.ecute.rsa.core.internal.dialogs.ProgressLogDialog; import com.ibm.ecute.utils.License; import com.ibm.xtools.common.ui.properties.TabbedPropertySheetPage; import com.ibm.xtools.emf.msl.EditingDomain; @@ -90,6 +93,7 @@ private Button editValueButton; public Button showAllButton; private Button inheritedValueButton; + private Button checkButton; private Button checkAndRepairButton; private TableColumn nameColumn; private TableColumn valueColumn; @@ -166,25 +170,61 @@ }); - //formdata inherited values buootn + //formdata inherited values button formdata = new FormData(); formdata.left = new FormAttachment(inheritedValueButton,10); formdata.top = new FormAttachment(0,0); - checkAndRepairButton = getWidgetFactory().createButton(composite1, "Check and Repair", 8); - checkAndRepairButton.setLayoutData(formdata); - checkAndRepairButton.addSelectionListener(new SelectionAdapter() { + checkButton = getWidgetFactory().createButton(composite1, "Check", 8); + checkButton.setLayoutData(formdata); + checkButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent selectionevent) { final NamedElement element = (NamedElement)getEObject(); + + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (Exception e) { + } + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + ProgressLogDialog frame = new ProgressLogDialog(shell); + CheckAndRepair checkAndRepair = new CheckAndRepair(element.getModel()); - checkAndRepair.applyAllNativeInheritedValues(element); + checkAndRepair.checkAll(frame); refresh(); } }); + //formdata inherited values button + formdata = new FormData(); + formdata.left = new FormAttachment(checkButton,5); + formdata.top = new FormAttachment(0,0); + checkAndRepairButton = getWidgetFactory().createButton(composite1, "Check and Repair", 8); + checkAndRepairButton.setLayoutData(formdata); + checkAndRepairButton.addSelectionListener(new SelectionAdapter() { + + public void widgetSelected(SelectionEvent selectionevent) + { +// final NamedElement element = (NamedElement)getEObject(); +// +// try { +// UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); +// //"com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); +// } catch (Exception e) { +// } +// Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); +// ProgressLogDialog frame = new ProgressLogDialog(shell); +// +// CheckAndRepair checkAndRepair = new CheckAndRepair(element.getModel()); +// checkAndRepair.checkAll(frame); +// refresh(); + } + + }); + + //Table qualifiersTable = getWidgetFactory().createTable(composite1, SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.SINGLE| SWT.MouseDoubleClick); qualifiersTable.setHeaderVisible(true); |
From: Benjamin B. <bg...@us...> - 2005-08-05 07:55:24
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1099/Plugin/com/ibm/ecute/rsa/core/internal/dialogs Modified Files: EditQualifiersDialog.java Log Message: flavors check Index: EditQualifiersDialog.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/dialogs/EditQualifiersDialog.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- EditQualifiersDialog.java 28 Jul 2005 17:59:51 -0000 1.11 +++ EditQualifiersDialog.java 5 Aug 2005 07:55:14 -0000 1.12 @@ -1156,110 +1156,7 @@ if(!valueObject.equals(oldValueObject)){ if(valueObject.name.equalsIgnoreCase("Override")){ - handleOverrideSet(valueObject); -// // set reference name to override value if the name is not defined -// if(element.getName().equalsIgnoreCase("")){ -// EditingDomain editingDomain = UMLModeler.getEditingDomain(); -// try { -// final String value = valueObject.value; -// -// editingDomain.run( new ResourceSetModifyOperation("SetOverrideRoleName") { -// -// protected void execute(IProgressMonitor monitor) -// throws InvocationTargetException, InterruptedException { -// -// element.setName(value); -// } -// }, new NullProgressMonitor()); -// -// } catch (InvocationTargetException e) { -// e.printStackTrace(); -// } catch (InterruptedException e) { -// e.printStackTrace(); -// } -// -// } -// // propagate native inherited values -// if (valueObject.value.equalsIgnoreCase("null")){ -// editValue(valueObject, true); -// fillValueTable(element, valueTable); -// } else { -// editValue(valueObject, false); -// if(valueObject.value.equalsIgnoreCase(element.getName())){ -// FlavorsHelper flavorsHelper = new FlavorsHelper(element.getModel()); -// flavorsHelper.applyNativeInheritedValues(element, false); -// if(element instanceof Property){ -// int minIndex = -1; -// int maxIndex = -1; -// int writeIndex = -1; -// for(int j = 0; j < valueTable.getItemCount(); j++){ -// QualifierValueObject object = (QualifierValueObject)valueTable.getItem(j).getData(); -// if(object.name.equalsIgnoreCase("Min") -// && (valueTable.getItem(j).getBackground() == YELLOW || valueTable.getItem(j).getBackground() == RED)){ -// minIndex = j; -// } else if(object.name.equalsIgnoreCase("Max") -// && (valueTable.getItem(j).getBackground() == YELLOW || valueTable.getItem(j).getBackground() == RED)){ -// maxIndex = j; -// } else if(object.name.equalsIgnoreCase("Write") -// && (valueTable.getItem(j).getBackground() == YELLOW || valueTable.getItem(j).getBackground() == RED)){ -// writeIndex = j; -// } -// } -// -// if(minIndex > -1){ -// if(valueTable.getItem(minIndex).getBackground() == YELLOW){ -// removeFromEditedValues((QualifierValueObject)valueTable.getItem(minIndex).getData()); -// } else if(valueTable.getItem(minIndex).getBackground() == RED){ -// removeFromRemovedValues((QualifierValueObject)valueTable.getItem(minIndex).getData()); -// } -// valueTable.getItem(minIndex).setBackground(WHITE); -// } -// if(maxIndex > -1){ -// if(valueTable.getItem(maxIndex).getBackground() == YELLOW){ -// removeFromEditedValues((QualifierValueObject)valueTable.getItem(maxIndex).getData()); -// } else if(valueTable.getItem(maxIndex).getBackground() == RED){ -// removeFromRemovedValues((QualifierValueObject)valueTable.getItem(maxIndex).getData()); -// } -// valueTable.getItem(maxIndex).setBackground(WHITE); -// } -// if(writeIndex > -1){ -// if(valueTable.getItem(writeIndex).getBackground() == YELLOW){ -// removeFromEditedValues((QualifierValueObject)valueTable.getItem(writeIndex).getData()); -// } else if(valueTable.getItem(writeIndex).getBackground() == RED){ -// removeFromRemovedValues((QualifierValueObject)valueTable.getItem(writeIndex).getData()); -// } -// valueTable.getItem(writeIndex).setBackground(WHITE); -// MessageBox messageBox = -// new MessageBox(Display.getCurrent().getActiveShell(), -// SWT.OK| -// SWT.ICON_INFORMATION); -// messageBox.setText("Override qualifier set"); -// messageBox.setMessage("The \"override\" qualifier is set and so the value of\n" + -// "the \"write\" qualifier is inherited from the corresponding\n" + -// "property of the parent class.\n\n" + -// "The pending change for the \"write\" qualifier was removed."); -// messageBox.open(); -// } -// -// if(minIndex > -1 || maxIndex > -1){ -// MessageBox messageBox = -// new MessageBox(Display.getCurrent().getActiveShell(), -// SWT.OK| -// SWT.ICON_INFORMATION); -// messageBox.setText("Override qualifier set"); -// messageBox.setMessage("The \"override\" qualifier is set and so the value of\n" + -// "the \"min\" and/or the \"max\" qualifier ise inherited\n" + -// "from the corresponding association end of the parent\n" + -// "association class.\n\n" + -// "The pending changes for the \"min\" and/or the \"max\"\n" + -// "qualifier were removed."); -// messageBox.open(); -// } -// } -// } -// fillValueTable(element, valueTable); -// } } else { @@ -1388,15 +1285,6 @@ allAvailableQualifers.add(vector.get(i)); } -// String definedIn = ""; -// if(element instanceof Class){ -// definedIn = element.getName(); -// }else{ -// Element owner = element.getOwner(); -// if(owner instanceof NamedElement) -// definedIn = ((NamedElement)element.getOwner()).getName(); -// } - String definedIn = ""; if(element instanceof Class){ definedIn = element.getName(); @@ -1413,14 +1301,13 @@ List qualifierNames = (List) element.getValue(cimStereotype, "QualifierName"); List qualifierValues = (List) element.getValue(cimStereotype, "QualifierValue"); - for(int i=0; i<qualifierNames.size(); i++){ + for(int i = 0; i < qualifierNames.size(); i++){ String qualifierName = (String)qualifierNames.get(i); String qualifierValue = (String)qualifierValues.get(i); Qualifier qualifierObject = qualifiersList.GetElement(qualifierName); addQualiferToValueTable(qualifierName, qualifierValue, definedIn, qualifierObject, i, false); allAvailableQualifers.remove(qualifierObject); - } //display all qualifiers witch are mapped directly to the model @@ -1699,7 +1586,7 @@ Operation op = (Operation)element; Type type = null; if(op.getReturnResult("ReturnType") != null){ - op.getReturnResult("ReturnType").getType(); + type = op.getReturnResult("ReturnType").getType(); } if(type != null){ if(type.getName().equalsIgnoreCase(octetstring) || type.getName().equalsIgnoreCase(octetstring_array)){ @@ -2268,7 +2155,9 @@ } } rolesComboBox.add(roleName,i); - propertiesComboBox.remove(roleName); + if(propertiesComboBox.getData(roleName) != null){ + propertiesComboBox.remove(roleName); + } } rolesComboBox.setText("Roles"); } @@ -3813,7 +3702,7 @@ } valueTable.getItem(maxIndex).setBackground(WHITE); } - + if(writeIndex > -1){ if(valueTable.getItem(writeIndex).getBackground().equals(YELLOW)){ removeFromEditedValues((QualifierValueObject)valueTable.getItem(writeIndex).getData()); @@ -3827,9 +3716,9 @@ SWT.ICON_INFORMATION); messageBox.setText("Override qualifier set"); messageBox.setMessage("The \"override\" qualifier is set and so the value of\n" + - "the \"write\" qualifier is inherited from the corresponding\n" + - "property of the parent class.\n\n" + - "The pending change for the \"write\" qualifier was removed."); + "the \"write\" qualifier is inherited from the corresponding\n" + + "property of the parent class.\n\n" + + "The pending change for the \"write\" qualifier was removed."); messageBox.open(); } @@ -3840,43 +3729,45 @@ SWT.ICON_INFORMATION); messageBox.setText("Override qualifier set"); messageBox.setMessage("The \"override\" qualifier is set and so the value of\n" + - "the \"min\" and/or the \"max\" qualifier is inherited\n" + - "from the corresponding association end of the parent\n" + - "association class.\n\n" + - "The pending changes for the \"min\" and/or the \"max\"\n" + - "qualifier were removed."); + "the \"min\" and/or the \"max\" qualifier is inherited\n" + + "from the corresponding association end of the parent\n" + + "association class.\n\n" + + "The pending changes for the \"min\" and/or the \"max\"\n" + + "qualifier were removed."); messageBox.open(); } // set effective inherited Values CheckAndRepair checker = new CheckAndRepair(element.getModel()); - //checker.applyAllNativeInheritedValues((Property)element); + + // if element is a reference then set the aggregate qualifer using the parent class + if(checker.isReference(element)){ + flavorsHelper.applyNativeInheritedValues((AssociationClass)element.getOwner(), true); + } // if the element in which the override qualifier is set has child elements then // a question dialog is shown which asks if the min/max/write qualifiers value // should be propagated + boolean skipEnableOverride = true; ArrayList overrideSubProperties = checker.getOverrideSubProperties((Property)element); if(overrideSubProperties.size() > 0){ if(checker.isReference(element)){ + //flavorsHelper.applyNativeInheritedValues((AssociationClass)element.getOwner(), true); MessageBox messageBox = new MessageBox(Display.getCurrent().getActiveShell(), SWT.YES|SWT.NO| SWT.ICON_QUESTION); messageBox.setText("Propagate qualifier values"); messageBox.setMessage("Do you want to propagate the qualifier values of\n" + - "the \"min\" and \"max\" qualifiers to the association\n" + - "ends of the subclasses?"); + "the \"min\" and \"max\" qualifiers to the association\n" + + "ends of the subclasses?"); int returnResult = messageBox.open(); if(returnResult == SWT.YES){ - // set the min/max values in the subProperties - for(int i = 0; i < overrideSubProperties.size(); i++){ - Property subProperty = (Property)overrideSubProperties.get(i); - subProperty.setLowerValue(((Property)element).getLowerValue()); - subProperty.setUpperValue(((Property)element).getUpperValue()); - } + skipEnableOverride = false; } + } else { MessageBox messageBox = new MessageBox(Display.getCurrent().getActiveShell(), @@ -3884,22 +3775,18 @@ SWT.ICON_QUESTION); messageBox.setText("Propagate qualifier values"); messageBox.setMessage("Do you want to propagate the qualifier value of\n" + - "the \"write\" qualifier to the properites of\n" + - "the subclasses?"); + "the \"write\" qualifier to the properites of\n" + + "the subclasses?"); int returnResult = messageBox.open(); if(returnResult == SWT.YES){ - // set the write value in the subProperties - for(int i = 0; i < overrideSubProperties.size(); i++){ - Property subProperty = (Property)overrideSubProperties.get(i); - subProperty.setIsReadOnly(((Property)element).isReadOnly()); - } + skipEnableOverride = false; } } // propagate all native qualifiers except min,max and write for(int i = 0; i < overrideSubProperties.size(); i++){ - checker.applyAllNativeInheritedValues((Property)overrideSubProperties.get(i)); + flavorsHelper.applyNativeInheritedValues((Property)overrideSubProperties.get(i), skipEnableOverride); } } @@ -3911,7 +3798,6 @@ } fillValueTable(element, valueTable); } - } private void addToEditedValues(QualifierValueObject valueObject){ |
From: Benjamin B. <bg...@us...> - 2005-08-05 07:55:22
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1099/Plugin/com/ibm/ecute/utils Modified Files: Constants.java Log Message: flavors check Index: Constants.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/utils/Constants.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Constants.java 25 Jul 2005 07:57:19 -0000 1.18 +++ Constants.java 5 Aug 2005 07:55:14 -0000 1.19 @@ -22,7 +22,7 @@ public class Constants { - public static final String pluginVersion="2.1 beta 1h"; + public static final String pluginVersion="2.1 beta 1h1"; public static final String toolName="ECUTE"; public static final String qualifiersFileName="QualifiersList.txt"; |
From: Adrian S. <a3s...@us...> - 2005-08-02 17:40:53
|
Update of /cvsroot/sblim/mofc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28150/mofc Modified Files: configure.ac Log Message: Added -fsigned-char compile flag to ensure ppc gcc treats char the same way as gcc on ix86 Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/mofc/configure.ac,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- configure.ac 14 Jun 2005 09:01:40 -0000 1.5 +++ configure.ac 2 Aug 2005 17:40:44 -0000 1.6 @@ -13,7 +13,7 @@ CFLAGS=-W"c,ASCII,dll,expo,langlvl(extended),float" LDFLAGS=-W"l,XPLINK,dll,EDIT=NO" ;; - **) CFLAGS=-Wall + **) CFLAGS="-Wall -fsigned-char" CFLAGS="-g $CFLAGS" ;; esac |
From: Adrian S. <a3s...@us...> - 2005-08-02 17:40:53
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28150 Modified Files: configure.ac Log Message: Added -fsigned-char compile flag to ensure ppc gcc treats char the same way as gcc on ix86 Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/sfcb/configure.ac,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- configure.ac 27 Jul 2005 16:22:38 -0000 1.16 +++ configure.ac 2 Aug 2005 17:40:43 -0000 1.17 @@ -69,7 +69,7 @@ ;; linux*) SFCB_CMPI_PLATFORM="-D CMPI_PLATFORM_LINUX_GENERIC_GNU" SFCB_CMPI_OS="-D CMPI_OS_LINUX" - CFLAGS=-Wall + CFLAGS="-Wall -fsigned-char" if test "$enable_debug" != "no"; then CFLAGS="-g $CFLAGS" fi |
From: Adrian S. <a3s...@us...> - 2005-08-02 11:08:02
|
Update of /cvsroot/sblim/mofc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5627 Modified Files: mofparse.c Log Message: fixed [ 1250128 ] sfcbmof fails on ppc char opt; on line 49 changed to int opt; Index: mofparse.c =================================================================== RCS file: /cvsroot/sblim/mofc/mofparse.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mofparse.c 7 Jun 2005 09:05:54 -0000 1.2 +++ mofparse.c 2 Aug 2005 11:07:45 -0000 1.3 @@ -46,7 +46,7 @@ static int parse_options(int argc, char * argv[]) { - char opt; + int opt; while ((opt=getopt(argc,argv,valid_options)) != -1) { switch (opt) { case 'b': |
From: Viktor M. <mih...@us...> - 2005-07-29 12:27:49
|
Update of /cvsroot/sblim/cmpi-fsvol In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18242 Modified Files: ChangeLog Makefile.am configure.ac provider-register.sh sblim-cmpi-fsvol.spec.in Log Message: Bug fixed: 1236584. Enhanced tog-pegasus compatibility and made more rpmlint-friendly. Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/configure.ac,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- configure.ac 1 Jun 2005 12:38:08 -0000 1.5 +++ configure.ac 29 Jul 2005 12:27:39 -0000 1.6 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(SBLIM BaseOS Filesystem Providers, 1.4.1, sbl...@li...,sblim-cmpi-fsvol) +AC_INIT(SBLIM BaseOS Filesystem Providers, 1.4.2, sbl...@li...,sblim-cmpi-fsvol) AC_CONFIG_SRCDIR([OSBase_CommonFsvol.c]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 2 May 2005 15:50:07 -0000 1.3 +++ Makefile.am 29 Jul 2005 12:27:39 -0000 1.4 @@ -54,6 +54,7 @@ OSBase_LocalFileSystem.c libcmpiOSBase_LocalFileSystemProvider_la_LIBADD = \ -lcmpiOSBase_CommonFsvol +libcmpiOSBase_LocalFileSystemProvider_la_LDFLAGS = -avoid-version # Network Filesystem libcmpiOSBase_NFSProvider_la_SOURCES = \ @@ -62,6 +63,7 @@ OSBase_NFS.c libcmpiOSBase_NFSProvider_la_LIBADD = \ -lcmpiOSBase_CommonFsvol +libcmpiOSBase_NFSProvider_la_LDFLAGS = -avoid-version # Block Storage Statistical Data libcmpiOSBase_BlockStorageStatisticalDataProvider_la_SOURCES = \ @@ -70,12 +72,14 @@ OSBase_BlockStorageStatisticalData.c libcmpiOSBase_BlockStorageStatisticalDataProvider_la_LIBADD = \ -lcmpiOSBase_CommonFsvol +libcmpiOSBase_BlockStorageStatisticalDataProvider_la_LDFLAGS = -avoid-version # Hosted Filesystem (Association) libcmpiOSBase_HostedFileSystemProvider_la_SOURCES = \ cmpiOSBase_HostedFileSystemProvider.c libcmpiOSBase_HostedFileSystemProvider_la_LIBADD = \ -lcmpiOSBase_CommonFsvol +libcmpiOSBase_HostedFileSystemProvider_la_LDFLAGS = -avoid-version # Boot OS from Filesystem (Association) libcmpiOSBase_BootOSFromFSProvider_la_SOURCES = \ @@ -83,6 +87,7 @@ cmpiOSBase_BootOSFromFS.c libcmpiOSBase_BootOSFromFSProvider_la_LIBADD = \ -lcmpiOSBase_CommonFsvol +libcmpiOSBase_BootOSFromFSProvider_la_LDFLAGS = -avoid-version # OSBase support utility libraries lib_LTLIBRARIES = libcmpiOSBase_CommonFsvol.la Index: sblim-cmpi-fsvol.spec.in =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/sblim-cmpi-fsvol.spec.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sblim-cmpi-fsvol.spec.in 2 May 2005 15:50:07 -0000 1.2 +++ sblim-cmpi-fsvol.spec.in 29 Jul 2005 12:27:39 -0000 1.3 @@ -4,21 +4,24 @@ # Package spec for @PACKAGE@ # -BuildRoot: /var/tmp/buildroot +# for TOG Pegasus invoke with rpmbuild --define 'tog_pegasus 1' + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Summary: SBLIM FSVOL Instrumentation Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ -Release: 1 +Release: 1%{?tog_pegasus:.tog_pegasus} Group: Systems Management/Base -License: Common Public License 1.0 +URL: http://www.sblim.org +License: CPL Source0: http://prdownloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2 BuildRequires: cmpi-devel BuildRequires: sblim-cmpi-base-devel -Requires: cimserver sblim-cmpi-base +Requires: %{?tog_pegasus:tog-pegasus}%{!?tog_pegasus:cimserver} sblim-cmpi-base %Description Standards Based Linux Instrumentation File System and Storage Volume Providers @@ -50,66 +53,89 @@ %build -%configure TESTSUITEDIR=%{_datadir}/sblim-testsuite +%configure TESTSUITEDIR=%{_datadir}/sblim-testsuite \ + %{?tog_pegasus:CIMSERVER=pegasus PROVIDERDIR=/opt/tog-pegasus/providers/lib} make %clean -if [ `id -ur` != 0 ] -then -# paranoia check - rm -rf $RPM_BUILD_ROOT -fi +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %install -if [ `id -ur` != 0 ] -then -# paranoia check - rm -rf $RPM_BUILD_ROOT -fi +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install # remove unused libtool files rm -f $RPM_BUILD_ROOT/%{_libdir}/*a +strip $RPM_BUILD_ROOT/%{_libdir}/*.so* +%if %{?tog_pegasus:0}%{!?tog_pegasus:1} rm -f $RPM_BUILD_ROOT/%{_libdir}/cmpi/*a +strip $RPM_BUILD_ROOT/%{_libdir}/cmpi/*.so* +%else +rm -f $RPM_BUILD_ROOT/opt/tog-pegasus/providers/lib/*a +strip $RPM_BUILD_ROOT/opt/tog-pegasus/providers/lib/*.so* +%endif -%post -# Register Schema and Provider - this is higly provider specific - +%pre %define SCHEMA %{_datadir}/%{name}/Linux_Fsvol.mof %define REGISTRATION %{_datadir}/%{name}/Linux_Fsvol.registration -%{_datadir}/%{name}/provider-register.sh \ +# If upgrading, deregister old version +if [ $1 -gt 1 ] +then + %{_datadir}/%{name}/provider-register.sh -d %{?tog_pegasus:-t pegasus} \ + -r %{REGISTRATION} -m %{SCHEMA} > /dev/null +fi + +%post +# Register Schema and Provider - this is higly provider specific + +%{_datadir}/%{name}/provider-register.sh %{?tog_pegasus:-t pegasus} \ -r %{REGISTRATION} -m %{SCHEMA} > /dev/null /sbin/ldconfig %preun - -%{_datadir}/%{name}/provider-register.sh -d \ +# Deregister only if not upgrading +if [ $1 -eq 0 ] +then + %{_datadir}/%{name}/provider-register.sh -d %{?tog_pegasus:-t pegasus} \ -r %{REGISTRATION} -m %{SCHEMA} > /dev/null +fi -%postun -/sbin/ldconfig +%postun +# Run ldconfig only if not upgrading +if [ $1 -eq 0 ] +then + /sbin/ldconfig +fi %files %defattr(-,root,root) +%docdir %{_datadir}/doc/%{name}-%{version} %{_datadir}/%{name} %{_datadir}/doc/%{name}-%{version} -%{_libdir}/*.so* -%{_libdir}/cmpi/*.so* - +%{_libdir}/*.so.* +%if %{?tog_pegasus:0}%{!?tog_pegasus:1} +%{_libdir}/cmpi/*.so +%else +/opt/tog-pegasus/providers/lib/*.so +%endif %files devel %defattr(-,root,root) -%{_includedir} +%{_includedir}/* +%{_libdir}/*.so %files test %defattr(-,root,root) %{_datadir}/sblim-testsuite +%changelog +* Wed Jul 20 2005 Mark Hamzy <ha...@us...> %{version}-%{release} + - initial support Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/provider-register.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- provider-register.sh 28 Jul 2005 15:25:36 -0000 1.4 +++ provider-register.sh 29 Jul 2005 12:27:39 -0000 1.5 @@ -136,7 +136,7 @@ Namespaces = {"$NAMESPACE"}; SupportedProperties = NULL; SupportedMethods = NULL; - CapabilityID = "$serial"; + CapabilityID = "$CLASSNAME-$serial"; }; EOFC Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ChangeLog 28 Jul 2005 15:25:35 -0000 1.7 +++ ChangeLog 29 Jul 2005 12:27:39 -0000 1.8 @@ -1,3 +1,9 @@ +2005-07-29 <mihajlov@localhost.localdomain> + + * sblim-cmpi-fsvol.spec.in: + Bug 1236584: enhance compatibilty with tog-pegasus style + and make more rpmlint-friendly. (By Mark Hamzy) + 2005-07-28 <mih...@dy...> * provider-register.sh: |
From: Viktor M. <mih...@us...> - 2005-07-29 12:24:51
|
Update of /cvsroot/sblim/cmpi-network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17295 Modified Files: ChangeLog Makefile.am configure.ac provider-register.sh sblim-cmpi-network.spec.in Log Message: Bug fixed: 1236584. Enhanced tog-pegasus compatibility and made more rpmlint-friendly. Index: sblim-cmpi-network.spec.in =================================================================== RCS file: /cvsroot/sblim/cmpi-network/sblim-cmpi-network.spec.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sblim-cmpi-network.spec.in 4 May 2005 14:43:48 -0000 1.2 +++ sblim-cmpi-network.spec.in 29 Jul 2005 12:24:07 -0000 1.3 @@ -4,21 +4,24 @@ # Package spec for @PACKAGE@ # -BuildRoot: /var/tmp/buildroot +# for TOG Pegasus invoke with rpmbuild --define 'tog_pegasus 1' + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Summary: SBLIM Network Instrumentation Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ -Release: 1 +Release: 1%{?tog_pegasus:.tog_pegasus} Group: Systems Management/Base -License: Common Public License 1.0 +URL: http://www.sblim.org +License: CPL Source0: http://prdownloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2 BuildRequires: cmpi-devel BuildRequires: sblim-cmpi-base-devel -Requires: cimserver sblim-cmpi-base +Requires: %{?tog_pegasus:tog-pegasus}%{!?tog_pegasus:cimserver} sblim-cmpi-base %Description Standards Based Linux Instrumentation Network Providers @@ -50,66 +53,90 @@ %build -%configure TESTSUITEDIR=%{_datadir}/sblim-testsuite +%configure TESTSUITEDIR=%{_datadir}/sblim-testsuite \ + %{?tog_pegasus:CIMSERVER=pegasus PROVIDERDIR=/opt/tog-pegasus/providers/lib} make %clean -if [ `id -ur` != 0 ] -then -# paranoia check - rm -rf $RPM_BUILD_ROOT -fi +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %install -if [ `id -ur` != 0 ] -then -# paranoia check - rm -rf $RPM_BUILD_ROOT -fi +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install # remove unused libtool files rm -f $RPM_BUILD_ROOT/%{_libdir}/*a +strip $RPM_BUILD_ROOT/%{_libdir}/*.so* +%if %{?tog_pegasus:0}%{!?tog_pegasus:1} rm -f $RPM_BUILD_ROOT/%{_libdir}/cmpi/*a +strip $RPM_BUILD_ROOT/%{_libdir}/cmpi/*.so* +%else +rm -f $RPM_BUILD_ROOT/opt/tog-pegasus/providers/lib/*a +strip $RPM_BUILD_ROOT/opt/tog-pegasus/providers/lib/*.so* +%endif -%post -# Register Schema and Provider - this is higly provider specific +%pre %define SCHEMA %{_datadir}/%{name}/Linux_Network.mof %define REGISTRATION %{_datadir}/%{name}/Linux_Network.registration -%{_datadir}/%{name}/provider-register.sh \ +# If upgrading, deregister old version +if [ $1 -gt 1 ] +then + %{_datadir}/%{name}/provider-register.sh -d %{?tog_pegasus:-t pegasus} \ + -r %{REGISTRATION} -m %{SCHEMA} > /dev/null +fi + +%post +# Register Schema and Provider - this is higly provider specific + +%{_datadir}/%{name}/provider-register.sh %{?tog_pegasus:-t pegasus} \ -r %{REGISTRATION} -m %{SCHEMA} > /dev/null /sbin/ldconfig %preun - -%{_datadir}/%{name}/provider-register.sh -d \ +# Deregister only if not upgrading +if [ $1 -eq 0 ] +then + %{_datadir}/%{name}/provider-register.sh -d %{?tog_pegasus:-t pegasus} \ -r %{REGISTRATION} -m %{SCHEMA} > /dev/null +fi -%postun -/sbin/ldconfig +%postun +# Run ldconfig only if not upgrading +if [ $1 -eq 0 ] +then + /sbin/ldconfig +fi %files %defattr(-,root,root) +%docdir %{_datadir}/doc/%{name}-%{version} %{_datadir}/%{name} %{_datadir}/doc/%{name}-%{version} -%{_libdir}/*.so* -%{_libdir}/cmpi/*.so* - +%{_libdir}/*.so.* +%if %{?tog_pegasus:0}%{!?tog_pegasus:1} +%{_libdir}/cmpi/*.so +%else +/opt/tog-pegasus/providers/lib/*.so +%endif %files devel %defattr(-,root,root) -%{_includedir} +%{_includedir}/* +%{_libdir}/*.so %files test %defattr(-,root,root) %{_datadir}/sblim-testsuite +%changelog +* Wed Jul 20 2005 Mark Hamzy <ha...@us...> %{version}-%{release} + - initial support Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/cmpi-network/configure.ac,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- configure.ac 1 Jun 2005 13:03:32 -0000 1.4 +++ configure.ac 29 Jul 2005 12:24:07 -0000 1.5 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(SBLIM BaseOS Network Providers, 1.3.5, sbl...@li...,sblim-cmpi-network) +AC_INIT(SBLIM BaseOS Network Providers, 1.3.6, sbl...@li...,sblim-cmpi-network) AC_CONFIG_SRCDIR([OSBase_CommonNetwork.c]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/cmpi-network/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 4 May 2005 14:43:48 -0000 1.2 +++ Makefile.am 29 Jul 2005 12:24:07 -0000 1.3 @@ -54,6 +54,7 @@ cmpiOSBase_EthernetPort.c libcmpiOSBase_EthernetPortProvider_la_LIBADD = \ -lOSBase_CommonNetwork +libcmpiOSBase_EthernetPortProvider_la_LDFLAGS = -avoid-version # Token Ring Port libcmpiOSBase_TokenRingPortProvider_la_SOURCES = \ @@ -61,6 +62,7 @@ cmpiOSBase_TokenRingPort.c libcmpiOSBase_TokenRingPortProvider_la_LIBADD = \ -lOSBase_CommonNetwork +libcmpiOSBase_TokenRingPortProvider_la_LDFLAGS = -avoid-version # Local Loopback Port libcmpiOSBase_LocalLoopbackPortProvider_la_SOURCES = \ @@ -68,6 +70,7 @@ cmpiOSBase_LocalLoopbackPort.c libcmpiOSBase_LocalLoopbackPortProvider_la_LIBADD = \ -lOSBase_CommonNetwork +libcmpiOSBase_LocalLoopbackPortProvider_la_LDFLAGS = -avoid-version # IP Protocol Endpoint libcmpiOSBase_IPProtocolEndpointProvider_la_SOURCES = \ @@ -76,12 +79,14 @@ OSBase_IPProtocolEndpoint.c libcmpiOSBase_IPProtocolEndpointProvider_la_LIBADD = \ -lOSBase_CommonNetwork +libcmpiOSBase_IPProtocolEndpointProvider_la_LDFLAGS = -avoid-version # CS Network Port (Association) libcmpiOSBase_CSNetworkPortProvider_la_SOURCES = \ cmpiOSBase_CSNetworkPortProvider.c libcmpiOSBase_CSNetworkPortProvider_la_LIBADD = \ -lOSBase_CommonNetwork +libcmpiOSBase_CSNetworkPortProvider_la_LDFLAGS = -avoid-version # Network Port Implements IP Endpoint (Association) libcmpiOSBase_NetworkPortImplementsIPEndpointProvider_la_SOURCES = \ @@ -89,6 +94,7 @@ cmpiOSBase_NetworkPortImplementsIPEndpoint.c libcmpiOSBase_NetworkPortImplementsIPEndpointProvider_la_LIBADD = \ -lOSBase_CommonNetwork +libcmpiOSBase_NetworkPortImplementsIPEndpointProvider_la_LDFLAGS = -avoid-version # OSBase support utility libraries lib_LTLIBRARIES = libOSBase_CommonNetwork.la Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-network/provider-register.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- provider-register.sh 28 Jul 2005 15:28:50 -0000 1.4 +++ provider-register.sh 29 Jul 2005 12:24:07 -0000 1.5 @@ -136,7 +136,7 @@ Namespaces = {"$NAMESPACE"}; SupportedProperties = NULL; SupportedMethods = NULL; - CapabilityID = "$serial"; + CapabilityID = "$CLASSNAME-$serial"; }; EOFC Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/cmpi-network/ChangeLog,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ChangeLog 28 Jul 2005 15:28:50 -0000 1.5 +++ ChangeLog 29 Jul 2005 12:24:07 -0000 1.6 @@ -1,3 +1,9 @@ +2005-07-29 <mihajlov@localhost.localdomain> + + * sblim-cmpi-network.spec.in: + Bug 1236584: enhancements for compatibility with tog-pegasus. + Made more rpmlint-friendly. (By Mark Hamzy). + 2005-07-28 <mih...@dy...> * provider-register.sh: |
From: Benjamin B. <bg...@us...> - 2005-07-28 18:00:04
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22981/Plugin/com/ibm/ecute/rsa/core/internal/properties Modified Files: QualifiersPropertySection.java FlavorsHelper.java Added Files: CheckAndRepair.java Log Message: propagation of min, max and write qualifiers when override is set interactively Index: FlavorsHelper.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties/FlavorsHelper.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- FlavorsHelper.java 25 Jul 2005 07:57:18 -0000 1.5 +++ FlavorsHelper.java 28 Jul 2005 17:59:51 -0000 1.6 @@ -10,6 +10,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.Vector; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; @@ -19,6 +20,7 @@ import org.eclipse.uml2.Class; import org.eclipse.uml2.Comment; import org.eclipse.uml2.Constraint; +import org.eclipse.uml2.Element; import org.eclipse.uml2.Model; import org.eclipse.uml2.NamedElement; import org.eclipse.uml2.OpaqueExpression; @@ -26,12 +28,14 @@ import org.eclipse.uml2.Package; import org.eclipse.uml2.Parameter; import org.eclipse.uml2.ParameterDirectionKind; +import org.eclipse.uml2.PrimitiveType; import org.eclipse.uml2.Property; import org.eclipse.uml2.Stereotype; import org.eclipse.uml2.Type; import org.eclipse.uml2.UML2Package; import com.ibm.ecute.EcuteEclipsePlugin; +import com.ibm.ecute.Qualifiers.Qualifier; import com.ibm.ecute.Qualifiers.QualifiersList; import com.ibm.ecute.utils.License; import com.ibm.ecute.rsa.core.internal.properties.EffectiveInheritedValue; @@ -59,6 +63,13 @@ private static String QUALIFIERS_CONSTRAINT_NAME = "QualifiersList"; + public static final int TCATEGORY=0; + public static final int TCLASS=1; + public static final int TMETHOD=2; + public static final int TATTRIBUTE=3; + public static final int TPARAMETER=4; + public static final int TLINK1=5; + public static final int TLINK2=6; Model model; QualifiersList qualifiersList; @@ -71,13 +82,13 @@ this.qualifiersList = this.getQualifiersList(); } - public void setModelFlavors(){ - ArrayList modelSubClasses = getAllModelSubClasses(); - for(int i = 0; i < modelSubClasses.size(); i++){ - Class modelSubClass = (Class)modelSubClasses.get(i); - setClassFlavors(modelSubClass); - } - } +// public void setModelFlavors(){ +// ArrayList modelSubClasses = getAllModelSubClasses(); +// for(int i = 0; i < modelSubClasses.size(); i++){ +// Class modelSubClass = (Class)modelSubClasses.get(i); +// setClassFlavors(modelSubClass); +// } +// } private void setClassFlavors(Class class_){ ArrayList parentClasses = getAllParentClasses(class_); @@ -239,6 +250,15 @@ return false; } + + private boolean isNativeMappedQualifier(Qualifier qualifier){ + + if(isNativeMappedQualifier(qualifier.name)){ + return true; + } else { + return false; + } + } private ArrayList getAllParentClasses(Class class_){ @@ -272,45 +292,7 @@ // return parentClasses; // } - private ArrayList getAllChildClasses(Class class_){ - - ArrayList childClasses = new ArrayList(); - - // get model classes - ArrayList modelClasses = getAllModelClasses((NamedElement)class_); - if(modelClasses.size() <= 0){ - return null; - } - - ArrayList currentChildren = new ArrayList(); - currentChildren.add(class_); - - while(currentChildren.size() > 0){ - //int m = currentChildren.size(); - //for(int i = 0; i < m; i++){ - String childClassName = ((Class)currentChildren.get(0)).getName(); - int n = modelClasses.size(); - for(int j = 0; j < n; j++){ - if(((Class)modelClasses.get(j)).getGenerals().size() > 0 && - (Class)((Class)modelClasses.get(j)).getGenerals().get(0) != null){ - String className = ((Class)((Class)modelClasses.get(j)).getGenerals().get(0)).getName(); - if(className.equalsIgnoreCase(childClassName)){ - currentChildren.add(modelClasses.get(j)); - childClasses.add(modelClasses.get(j)); - //m++; - modelClasses.remove(j); - j--; n--; - } - } - } - currentChildren.remove(0); - // i--; m--; - //} - } - - childClasses.trimToSize(); - return childClasses; - } + // public ArrayList getAllChildClasses(UMLClass class_){ // @@ -343,53 +325,22 @@ // return childClasses; // } - private ArrayList getAllModelClasses(NamedElement element){ - ArrayList classes = new ArrayList(); - Model model; - - // goto the model - while(!(element instanceof Model)){ - element = (NamedElement)element.getOwner(); - } - - if(!(element instanceof Model)){ - return null; - } else { - model = (Model)element; - } - - // get all owned packages - List packagesList = model.getOwnedMembers(); - - // get classes from packages and add to list - for(int i = 0; i < packagesList.size(); i++){ - Package currentPackage = (Package)packagesList.get(i); - List packageMembersList = currentPackage.getOwnedElements(); - for(int j = 0; j < packageMembersList.size(); j++){ - if(packageMembersList.get(j) instanceof Class){ - classes.add(packageMembersList.get(j)); - } - } - } - - classes.trimToSize(); - return classes; - } + - private ArrayList getAllModelSubClasses(){ - ArrayList modelClasses = getAllModelClasses(this.model); - ArrayList modelSubClasses = new ArrayList(); - - for(int i = 0; i < modelClasses.size(); i++){ - Class modelClass = (Class)modelClasses.get(i); - if(modelClass.getGenerals().size() > 0){ - modelSubClasses.add(modelClass); - } - } - - modelSubClasses.trimToSize(); - return modelSubClasses; - } +// private ArrayList getAllModelSubClasses(){ +// ArrayList modelClasses = getAllModelClasses(this.model); +// ArrayList modelSubClasses = new ArrayList(); +// +// for(int i = 0; i < modelClasses.size(); i++){ +// Class modelClass = (Class)modelClasses.get(i); +// if(modelClass.getGenerals().size() > 0){ +// modelSubClasses.add(modelClass); +// } +// } +// +// modelSubClasses.trimToSize(); +// return modelSubClasses; +// } private ArrayList getOverrideAttributes(Class class_){ ArrayList overrideAttributes = new ArrayList(); @@ -887,9 +838,9 @@ } if(attribute != null){ - Type datatype = property.getType(); - if(datatype != null){ - if(datatype.getName().equalsIgnoreCase("Octetstring")){ + Type type = attribute.getType(); + if(type != null){ + if(type.getName().equalsIgnoreCase("Octetstring")){ return(new EffectiveInheritedValue("true", (Class)parents.get(j))); } @@ -1061,8 +1012,12 @@ } if(attribute != null){ - if(!attribute.isReadOnly()){ - return(new EffectiveInheritedValue("true", (Class)parents.get(j))); + if(override(attribute) || !override(attribute) && j == parents.size()-1){ + if(!attribute.isReadOnly()){ + return(new EffectiveInheritedValue("true", (Class)parents.get(j))); + } else { + return(new EffectiveInheritedValue("false", (Class)parents.get(j))); + } } if(!override(attribute) && j != parents.size()-1){ return null; @@ -1263,7 +1218,7 @@ return qualifierValue; } - private static boolean override(NamedElement namedElement){ + public static boolean override(NamedElement namedElement){ Stereotype cimStereotype = namedElement.getAppliedStereotype("CIM::Qualifiers"); List qualifierNames = (List) namedElement.getValue(cimStereotype, "QualifierName"); @@ -1311,6 +1266,492 @@ return true; } + public void applyNativeInheritedValues(NamedElement element, boolean skipEnableOverride){ + + EditingDomain editingDomain = UMLModeler.getEditingDomain(); + ArrayList applicableQualifiers = getApplicableQualifiers(element); + // remove qualifiers with Restricted flavor + for(int i = 0; i < applicableQualifiers.size(); i++){ + Qualifier qualifier = (Qualifier)applicableQualifiers.get(i); + if(qualifier.RestrictedFlavor){ + applicableQualifiers.remove(i); + } + // remove qualifiers with Enable ToSubclass flavor + if(skipEnableOverride && !qualifier.DissableOverrideFlavor && !qualifier.RestrictedFlavor){ + applicableQualifiers.remove(i); + } + } + + boolean isComposition = false; + boolean minmax = false; + int minValue = 0; + int maxValue = -1; + + for(int i = 0; i < applicableQualifiers.size(); i++){ + if(isNativeMappedQualifier((Qualifier)applicableQualifiers.get(i))){ + String qualifierName = ((Qualifier)applicableQualifiers.get(i)).name; + String qualifierValue = null; + if(effectiveInheritedValue(element, qualifierName) != null){ + qualifierValue = effectiveInheritedValue(element, qualifierName).getValue(); + } + + if(qualifierName.equalsIgnoreCase("Min") && qualifierValue != null){ + minValue = new Integer(qualifierValue).intValue(); + minmax = true; + continue; + } else if(qualifierName.equalsIgnoreCase("Max") && qualifierValue != null){ + maxValue = new Integer(qualifierValue).intValue(); + minmax = true; + continue; + } + + if(qualifierValue != null && qualifierName.equalsIgnoreCase("Composition") + && qualifierValue.equalsIgnoreCase("true")){ + isComposition = true; + + } else if(qualifierValue != null && qualifierName.equalsIgnoreCase("Aggregation") + && isComposition){ + continue; + } + + if(qualifierValue != null && !qualifierName.equalsIgnoreCase("Description") && + !qualifierName.equalsIgnoreCase("Key")){ + + try { + final NamedElement namedElement = element; + final String qualName = qualifierName; + final String qualValue = qualifierValue; + + editingDomain.run(new ResourceSetModifyOperation("applyNativeInheritedValues") { + + protected void execute(IProgressMonitor monitor) throws InvocationTargetException, + InterruptedException { + mapQualifierToModel(namedElement, qualName, qualValue); + } + }, new NullProgressMonitor()); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } + } + + // apply min and max qualifier + if(minmax && element instanceof Property){ + try { + final NamedElement namedElement = element; + final String minV = (new Integer(minValue)).toString(); + final String maxV = (new Integer(maxValue)).toString(); + final boolean minFirst; + + int elementCurrentMax = ((Property)element).getUpper(); + int elementCurrentMin = ((Property)element).getLower(); + + if(maxValue < elementCurrentMin){ + minFirst = true; + } else { + minFirst = false; + } + + + editingDomain.run(new ResourceSetModifyOperation("applyNativeInheritedValues") { + + protected void execute(IProgressMonitor monitor) throws InvocationTargetException, + InterruptedException { + if(minFirst){ + mapQualifierToModel(namedElement, "Min", minV); + mapQualifierToModel(namedElement, "Max", maxV); + } else { + mapQualifierToModel(namedElement, "Max", maxV); + mapQualifierToModel(namedElement, "Min", minV); + } + } + }, new NullProgressMonitor()); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + if(element instanceof Class){ + Class class_ = (Class)element; + // apply native inherited values for class attributes + List properties = class_.getOwnedAttributes(); + for(int i = 0; i < properties.size(); i++){ + applyNativeInheritedValues((Property)properties.get(i), true); + } + // apply native inherited values for class methods + List methods = class_.getOwnedOperations(); + for(int i = 0; i < methods.size(); i++){ + applyNativeInheritedValues((Operation)methods.get(i), true); + } + + } + + if(element instanceof AssociationClass){ + AssociationClass aClass = (AssociationClass)element; + List ownedEnds = aClass.getOwnedEnds(); + for(int i = 0; i < ownedEnds.size(); i++){ + applyNativeInheritedValues((Property)ownedEnds.get(i), true); + } + } else if(element instanceof Operation){ + Operation operation = (Operation)element; + List parameters = operation.getOwnedParameters(); + for(int i = 0; i < parameters.size(); i++){ + applyNativeInheritedValues((Parameter)parameters.get(i), true); + } + } + } + + private ArrayList getApplicableQualifiers(NamedElement element){ + + String elementType = getNamedElementType(element); + + QualifiersList qualifiersList=null; + try { + qualifiersList = EcuteEclipsePlugin.getDefault().getQualifiersList(); + } catch (Exception e) { + e.printStackTrace(); + } + Vector vector = qualifiersList.GetElements(); + ArrayList applicableQualifers = new ArrayList(); + + for(int i=0; i < vector.size(); i++){ + Qualifier qualifier = (Qualifier)vector.get(i); + String qualifierScope = qualifier.scope2String(); + if(qualifierScope.indexOf(elementType) > -1){ + applicableQualifers.add(qualifier); + } + } + + return applicableQualifers; + } + + public void mapQualifierToModel(Element element, String qualifierName, String newValue){ + + // AGGREGATION, COMPOSITION + if(element instanceof AssociationClass){ + EList ownedEnds = ((AssociationClass)element).getOwnedEnds(); + Property prop1 = (Property)ownedEnds.get(0); + Property prop2 = (Property)ownedEnds.get(1); + + if(qualifierName.equalsIgnoreCase("Aggregation")){ + if(newValue.equalsIgnoreCase("false")){ + prop1.setAggregation(AggregationKind.NONE_LITERAL); + prop2.setAggregation(AggregationKind.NONE_LITERAL); // just to be sure + } else { + prop1.setAggregation(AggregationKind.SHARED_LITERAL); + prop2.setAggregation(AggregationKind.NONE_LITERAL); // just to be sure + } + } else if(qualifierName.equalsIgnoreCase("Composition")){ + if(newValue.equalsIgnoreCase("false")){ + prop1.setAggregation(AggregationKind.SHARED_LITERAL); + prop2.setAggregation(AggregationKind.NONE_LITERAL); // just to be sure + } else { + prop1.setAggregation(AggregationKind.COMPOSITE_LITERAL); + prop2.setAggregation(AggregationKind.NONE_LITERAL); // just to be sure + } + } + + // IN, OUT + } else if(element instanceof Parameter && + (qualifierName.equalsIgnoreCase("In")||qualifierName.equalsIgnoreCase("Out"))){ + + Parameter parameter = (Parameter)element; + + if(newValue.equalsIgnoreCase("true") && qualifierName.equalsIgnoreCase("In")){ + if(parameter.getDirection() == ParameterDirectionKind.OUT_LITERAL){ + parameter.setDirection(ParameterDirectionKind.INOUT_LITERAL); + } else if(parameter.getDirection() == ParameterDirectionKind.IN_LITERAL){ + // do nothing + } else if(parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL){ + // do nothing + } + + } else if(newValue.equalsIgnoreCase("true") && qualifierName.equalsIgnoreCase("Out")){ + if(parameter.getDirection() == ParameterDirectionKind.OUT_LITERAL){ + // do nothing + } else if(parameter.getDirection() == ParameterDirectionKind.IN_LITERAL){ + parameter.setDirection(ParameterDirectionKind.OUT_LITERAL); + } else if(parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL){ + // do nothing + } + } + + + // MIN, MAX + } else if(element instanceof Property){ + if(qualifierName.equalsIgnoreCase("Min")){ + int min = new Integer(newValue).intValue(); + ((Property) element).setLowerBound(min); + } + if(qualifierName.equalsIgnoreCase("Max")){ + if(newValue.equalsIgnoreCase("null")){ + newValue = "-1"; + } + int max = new Integer(newValue).intValue(); + try { + ((Property) element).setUpperBound(max); + } catch (RuntimeException e) { + // TODO + e.printStackTrace(); + } + } + } + + // DESCRIPTION + if(qualifierName.equalsIgnoreCase("Description")){ + EList list = element.getOwnedComments(); + if(newValue.equalsIgnoreCase("null")){ + list.clear(); + return; + } + Iterator it = list.iterator(); + if(it.hasNext()){ + while (it.hasNext()){ + Comment comment = (Comment)it.next(); + Stereotype stereo = comment.getApplicableStereotype("Default::Documentation"); + if(stereo != null){ + comment.setBody(newValue); + } + } + } else { + Comment descr = element.createOwnedComment(UML2Package.eINSTANCE.getComment()); + descr.setBody(newValue); + Stereotype stereo = descr.getApplicableStereotype("Default::Documentation"); + descr.apply(stereo); + } + + + // DEPRECATED + }else if(qualifierName.equalsIgnoreCase("Deprecated")){ + Stereotype appliedStereo = element.getAppliedStereotype("CIM::Deprecated"); + if(appliedStereo == null){ + Stereotype stereo = element.getApplicableStereotype("CIM::Deprecated"); + element.apply(stereo); + element.setValue(stereo, "Value", newValue); + } else { + if(newValue.equalsIgnoreCase("null")){ + element.unapply(appliedStereo); + } else { + element.setValue(appliedStereo, "Value", newValue); + } + } + + + //OCTETSTRING + } else if(qualifierName.equalsIgnoreCase("Octetstring")){ + if(newValue.equalsIgnoreCase("true")){ + PrimitiveType octetstring = (PrimitiveType)model.getImportedMember("octetstring"); + if(element instanceof Property){ + Property prop = (Property)element; + prop.setType(octetstring); + } else if(element instanceof Operation){ + Operation op = (Operation)element; + Parameter returnType = (Parameter)op.getReturnResults().get(0); + if(returnType == null){ + Parameter returnResult = op.createOwnedParameter(UML2Package.eINSTANCE.getParameter()); + returnResult.setDirection(ParameterDirectionKind.RETURN_LITERAL); + returnResult.setName("ReturnType"); + returnType.setType(octetstring); + } else { + returnType.setType(octetstring); + } + } else if(element instanceof Parameter){ + Parameter param = (Parameter)element; + param.setType(octetstring); + } + } + + + // STATIC + } else if(qualifierName.equalsIgnoreCase("static")){ + if(newValue.equalsIgnoreCase("true")){ + if(element instanceof Property){ + ((Property)element).setIsStatic(true); + } else if(element instanceof Operation){ + ((Operation)element).setIsStatic(true); + } + } else if(newValue.equalsIgnoreCase("false")){ + if(element instanceof Property){ + ((Property)element).setIsStatic(false); + } else if(element instanceof Operation){ + ((Operation)element).setIsStatic(false); + } + } + + + // WRITE + } else if(qualifierName.equalsIgnoreCase("write")){ + if(element instanceof Property){ + if(newValue.equalsIgnoreCase("true")){ + ((Property)element).setIsReadOnly(false); + } else if(newValue.equalsIgnoreCase("false")){ + ((Property)element).setIsReadOnly(true); + } + } + + + // ABSTRACT + } else if(qualifierName.equalsIgnoreCase("abstract")){ + if(element instanceof Class){ + if(newValue.equalsIgnoreCase("true")){ + ((Class)element).setIsAbstract(true); + } else if(newValue.equalsIgnoreCase("false")){ + ((Class)element).setIsAbstract(false); + } + } + + + // KEY + } else if(qualifierName.equalsIgnoreCase("key")){ + boolean keyIsApplied = true; + if(element instanceof Property){ + Property property = (Property)element; + Stereotype stereo = property.getAppliedStereotype("CIM::Key"); + if(stereo == null){ + stereo = property.getApplicableStereotype("CIM::Key"); + keyIsApplied = false; + } + if(newValue.equalsIgnoreCase("false")){ + property.unapply(stereo); + } else if(newValue.equalsIgnoreCase("true") && !keyIsApplied){ + property.apply(stereo); + } + } + } + + + // OCL +// if(qualifierName.equalsIgnoreCase("OCL")){ +// if (element instanceof Class){ +// List elementList = ((Class)element).getNearestPackage().getOwnedElements(); +// ArrayList constraintList = new ArrayList(); +// for (int i = 0; i < elementList.size(); i++){ +// if (elementList.get(i) instanceof Constraint) +// constraintList.add(elementList.get(i)); +// } +// boolean foundConstraint = false; +// if (constraintList != null){ +// for(int j = 0; j < constraintList.size(); j++){ +// Constraint constraint = (Constraint)constraintList.get(j); +// List constrainedElements = constraint.getConstrainedElements(); +// for(int k = 0; k < constrainedElements.size(); k++){ +// if(constrainedElements.get(k) instanceof Class){ +// if(((Class)constrainedElements.get(k)).getName().equalsIgnoreCase(((Class)element).getName())){ +// +// foundConstraint = true; +// +// if(newValue.equalsIgnoreCase("null")){ +// +// //constraint.setSpecification(null); +// constrainedElements.remove(0); +// +// ArrayList tempList = new ArrayList(elementList.size()-1); +// for(int m = 0; m < elementList.size(); m++){ +// +// if(!(elementList.get(m) instanceof Constraint)){ +// tempList.add(elementList.get(m)); +// } else { +// Constraint constr = (Constraint)elementList.get(m); +// if(!constr.getName().equalsIgnoreCase(constraint.getName())){ +// tempList.add(constr); +// } +// } +// } +// elementList = tempList; +// constraint.destroy(); +// break; +// } +// +// String tempBody, body = ""; +// // prepare constraint body content +// if(newValue.startsWith("{")){ +// newValue = newValue.substring(1); +// } +// if(newValue.endsWith("}")){ +// int length = newValue.length(); +// newValue = newValue.substring(0, length -1); +// } +// tempBody = newValue.trim(); +// +// int index = tempBody.indexOf(","); +// boolean multiple = false; +// if (index != -1) +// multiple = true; +// while (index != -1){ +// int length = tempBody.length(); +// body = body.concat(tempBody.substring(0, index - 1)); +// body = body.concat("\n"); +// tempBody = tempBody.substring(index + 2); +// index = tempBody.indexOf(","); +// } +// if (multiple){ +// body = body.concat(tempBody.substring(index + 1)); +// } +// if (!multiple) +// body = tempBody; +// +// //set constraint body +// ((OpaqueExpression)constraint.getSpecification()).setBody(body); +// } +// } +// } +// } +// } +// +// if(!foundConstraint && !newValue.equalsIgnoreCase("null")){ +// createClassOCL((Class)element, newValue); +// } +// } +// } + } + + private String getNamedElementType(NamedElement element){ + + String elementType = null; + if(element instanceof Class){ + elementType = "Class"; + if(element instanceof AssociationClass){ + elementType = "Association"; + } + } else if(element instanceof Property){ + if(propertyIsOwnedEnd((Property)element)){ + elementType = "Reference"; + } else { + elementType = "Property"; + } + } else if(element instanceof Operation){ + elementType = "Method"; + } else if(element instanceof Parameter){ + elementType = "Parameter"; + } + + return elementType; + } + + private int getNamedElementIntType(NamedElement element){ + int elementType = -1; + if(element instanceof Class){ + elementType = TCLASS; + } else if(element instanceof Property){ + if(propertyIsOwnedEnd((Property)element)){ + elementType = TLINK1; + } else { + elementType = TATTRIBUTE; + } + } else if(element instanceof Operation){ + elementType = TMETHOD; + } else if(element instanceof Parameter){ + elementType = TPARAMETER; + } + + return elementType; + } + } --- NEW FILE: CheckAndRepair.java --- /* * Created on 27.07.2005 */ package com.ibm.ecute.rsa.core.internal.properties; import java.util.ArrayList; import java.util.List; import org.eclipse.uml2.AssociationClass; import org.eclipse.uml2.Class; import org.eclipse.uml2.Model; import org.eclipse.uml2.NamedElement; import org.eclipse.uml2.Package; import org.eclipse.uml2.Property; import com.ibm.ecute.utils.License; /** * Copyright (c) 2005, International Business Machines * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE CONSTITUTES * RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://oss.software.ibm.com/developerworks/opensource/license-cpl.html * * @author Benjamin Bender <be...@de...> * */ public class CheckAndRepair { // Copyright private static final String COPYRIGHT = License.COPYRIGHT; private Model model; private FlavorsHelper flavorsHelper; public CheckAndRepair(Model model){ this.model = model; this.flavorsHelper = new FlavorsHelper(model); } public void applyAllNativeInheritedValues(NamedElement element){ ArrayList orderedModelClasses = getOrderedModelClasses(element); for(int i = 0; i < orderedModelClasses.size(); i++){ flavorsHelper.applyNativeInheritedValues((NamedElement)orderedModelClasses.get(i), true); } } private ArrayList getOrderedModelClasses(NamedElement element){ ArrayList classes = getAllModelClasses(element); ArrayList orderedClasses = new ArrayList(classes.size()); // get all classes without parents for(int i = 0; i < classes.size(); i++){ if(((Class)classes.get(i)).getGenerals().size() == 0){ orderedClasses.add(classes.get(i)); } } ArrayList tempList = orderedClasses; while(orderedClasses.size() < classes.size()){ ArrayList newOrderedClasses = new ArrayList(); for(int i = 0; i < tempList.size(); i++){ Class class_ = (Class)tempList.get(i); ArrayList childClasses = getAllChildClasses(class_); newOrderedClasses.addAll(childClasses); } orderedClasses.addAll(newOrderedClasses); tempList = newOrderedClasses; } return orderedClasses; } private ArrayList getAllModelClasses(NamedElement element){ ArrayList classes = new ArrayList(); // this call is usually used to modify the ownedMembers in the model List tempList = model.getOwnedMembers(); // so the list has to be copied to work with it ArrayList packagesList = new ArrayList(tempList.size()); for(int i = 0; i < tempList.size(); i++){ packagesList.add(tempList.get(i)); } // get classes from packages and add to list for(int i = 0; i < packagesList.size(); i++){ Package currentPackage = (Package)packagesList.get(i); List packageMembersList = currentPackage.getOwnedElements(); for(int j = 0; j < packageMembersList.size(); j++){ if(packageMembersList.get(j) instanceof Class){ classes.add(packageMembersList.get(j)); } else if(packageMembersList.get(j) instanceof Package){ packagesList.add(packageMembersList.get(j)); } } } classes.trimToSize(); return classes; } public ArrayList getAllChildClasses(Class class_){ ArrayList childClasses = new ArrayList(); // get model classes ArrayList modelClasses = getAllModelClasses((NamedElement)class_); if(modelClasses.size() <= 0){ return null; } ArrayList currentChildren = new ArrayList(); currentChildren.add(class_); while(currentChildren.size() > 0){ String childClassName = ((Class)currentChildren.get(0)).getName(); int n = modelClasses.size(); for(int j = 0; j < n; j++){ if(((Class)modelClasses.get(j)).getGenerals().size() > 0 && (Class)((Class)modelClasses.get(j)).getGenerals().get(0) != null){ String className = ((Class)((Class)modelClasses.get(j)).getGenerals().get(0)).getName(); if(className.equalsIgnoreCase(childClassName)){ currentChildren.add(modelClasses.get(j)); childClasses.add(modelClasses.get(j)); //m++; modelClasses.remove(j); j--; n--; } } } currentChildren.remove(0); } childClasses.trimToSize(); return childClasses; } public ArrayList getOverrideSubProperties(Property property){ ArrayList subproperties = new ArrayList(); // check if property is a class property or an association end boolean isReference = isReference(property); // get subclasses of the class which contains the property ArrayList subclasses = getAllChildClasses((Class)property.getOwner()); // check if subclasses define the searched property for(int i = 0; i < subclasses.size(); i++){ Class subClass = (Class)subclasses.get(i); Property subProperty; if(isReference){ AssociationClass subAClass = (AssociationClass)subClass; subProperty = subAClass.getOwnedEnd(property.getName()); } else { subProperty = subClass.getOwnedAttribute(property.getName()); } if(subProperty != null){ // if the subclass defines the property then check if the subProperty has // the override qualifiers set if(FlavorsHelper.override(subProperty)){ subproperties.add(subProperty); } } } return subproperties; } public boolean isReference(NamedElement element){ boolean isRef = false; if(element instanceof Property){ Property property = (Property)element; if(property.getOwner() instanceof AssociationClass){ AssociationClass aClass = (AssociationClass)property.getOwner(); if(aClass.getOwnedEnd(property.getName()) != null){ isRef = true; } } } return isRef; } } Index: QualifiersPropertySection.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/properties/QualifiersPropertySection.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- QualifiersPropertySection.java 25 Jul 2005 07:57:18 -0000 1.23 +++ QualifiersPropertySection.java 28 Jul 2005 17:59:51 -0000 1.24 @@ -89,6 +89,8 @@ private Button editValueButton; public Button showAllButton; + private Button inheritedValueButton; + private Button checkAndRepairButton; private TableColumn nameColumn; private TableColumn valueColumn; private TableColumn definedInColumn; @@ -117,7 +119,7 @@ FormData formdata = new FormData(); formdata.left = new FormAttachment(0,5); formdata.top = new FormAttachment(0,0); - editValueButton = getWidgetFactory().createButton(composite1, "Edit qualifiers", 8); + editValueButton = getWidgetFactory().createButton(composite1, "Edit qualifiers...", 8); editValueButton.setLayoutData(formdata); editValueButton.addSelectionListener(new SelectionAdapter() { @@ -145,6 +147,43 @@ } }); + + //formdata inherited values buootn + formdata = new FormData(); + formdata.left = new FormAttachment(showAllButton,30); + formdata.top = new FormAttachment(0,0); + inheritedValueButton = getWidgetFactory().createButton(composite1, "Apply inherited values", 8); + inheritedValueButton.setLayoutData(formdata); + inheritedValueButton.addSelectionListener(new SelectionAdapter() { + + public void widgetSelected(SelectionEvent selectionevent) + { + final NamedElement element = (NamedElement)getEObject(); + FlavorsHelper flavorHelper = new FlavorsHelper(element.getModel()); + flavorHelper.applyNativeInheritedValues(element, true); + refresh(); + } + + }); + + //formdata inherited values buootn + formdata = new FormData(); + formdata.left = new FormAttachment(inheritedValueButton,10); + formdata.top = new FormAttachment(0,0); + checkAndRepairButton = getWidgetFactory().createButton(composite1, "Check and Repair", 8); + checkAndRepairButton.setLayoutData(formdata); + checkAndRepairButton.addSelectionListener(new SelectionAdapter() { + + public void widgetSelected(SelectionEvent selectionevent) + { + final NamedElement element = (NamedElement)getEObject(); + CheckAndRepair checkAndRepair = new CheckAndRepair(element.getModel()); + checkAndRepair.applyAllNativeInheritedValues(element); + refresh(); + } + + }); + //Table qualifiersTable = getWidgetFactory().createTable(composite1, SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.SINGLE| SWT.MouseDoubleClick); |
From: Benjamin B. <bg...@us...> - 2005-07-28 18:00:00
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22981/Plugin/com/ibm/ecute/rsa/core/internal/dialogs Modified Files: EditQualifiersDialog.java Log Message: propagation of min, max and write qualifiers when override is set interactively Index: EditQualifiersDialog.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/rsa/core/internal/dialogs/EditQualifiersDialog.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- EditQualifiersDialog.java 25 Jul 2005 07:57:19 -0000 1.10 +++ EditQualifiersDialog.java 28 Jul 2005 17:59:51 -0000 1.11 @@ -75,6 +75,7 @@ import com.ibm.ecute.EcuteEclipsePlugin; import com.ibm.ecute.Qualifiers.Qualifier; import com.ibm.ecute.Qualifiers.QualifiersList; +import com.ibm.ecute.rsa.core.internal.properties.CheckAndRepair; import com.ibm.ecute.rsa.core.internal.properties.EffectiveInheritedValue; import com.ibm.ecute.rsa.core.internal.properties.FlavorsHelper; import com.ibm.ecute.rsa.core.internal.properties.QualifierDefinitionObject; @@ -240,23 +241,47 @@ if(folder.getSelectionIndex() == 0){ if(definitionTableChanged){ [...1202 lines suppressed...] if(valueObject.name.equalsIgnoreCase("Min")){ + //nullButton.setEnabled(false); + + } else if(valueObject.name.equalsIgnoreCase("Override") && ((Class)element.getOwner()).getGenerals().size() == 0){ + textLabel.setText("You can't change the value of the \"override\" qualifier !\n\n" + + "The parent class of the selected element doesn't inherit form\n" + + "any other class, so this element can't override another\n" + + "element.\n\n" + + "If you want to override an element of another class then you have\n" + + "to draw the generalization first before you can override the element.\n"); + //nullButton.setEnabled(false); + textField.setEnabled(false); nullButton.setEnabled(false); } - } + } return label; } |
From: Viktor M. <mih...@us...> - 2005-07-28 15:28:59
|
Update of /cvsroot/sblim/cmpi-network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14141 Modified Files: ChangeLog NEWS provider-register.sh Log Message: Bug fixed: 1236584. Enhanced tog-pegasus compatibility. Index: NEWS =================================================================== RCS file: /cvsroot/sblim/cmpi-network/NEWS,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- NEWS 12 May 2005 15:18:35 -0000 1.4 +++ NEWS 28 Jul 2005 15:28:50 -0000 1.5 @@ -1,3 +1,9 @@ +Changes in 1.3.6 +================ + +Bugs: +- 1236584 Enhance tog-pegasus compatibility + Changes in 1.3.5 ================ Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-network/provider-register.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- provider-register.sh 12 May 2005 15:18:35 -0000 1.3 +++ provider-register.sh 28 Jul 2005 15:28:50 -0000 1.4 @@ -16,6 +16,19 @@ # registration data for a variety of supported CIMOMs # ================================================================== +function pegasus_repository() +{ + for p in /var/lib/pegasus /usr/local/var/lib/pegasus \ + /var/local/lib/pegasus /var/opt/tog-pegasus $PEGASUS_HOME + do + if test -d $p/repository + then + echo $p/$1 + return 0 + fi + done + return 1 +} function pegasus_path() { @@ -79,10 +92,12 @@ done #produce Capabilities + let serial=0 for rf in $regfiles do cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS do + let serial=serial+1 numcap= for cap in $CAPS do @@ -121,7 +136,7 @@ Namespaces = {"$NAMESPACE"}; SupportedProperties = NULL; SupportedMethods = NULL; - CapabilityID = "1"; + CapabilityID = "$serial"; }; EOFC @@ -147,6 +162,13 @@ echo "Error: cimmof not found" >&2 return 1 fi + PEGASUSREPOSITORY=`pegasus_repository` + if test $? != 0 + then + echo "Error: pegasus repository not found" >&2 + return 1 + fi + CIMMOF="$CIMMOF -R $PEGASUSREPOSITORY" state=inactive fi @@ -241,7 +263,7 @@ echo "Error: wbemexec not found" >&2 return 1 fi - CLASSES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 1` + CLASSES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 1 | grep -v '^CIM_'` for cls in $CLASSES do chatter Delete CIM Class $cls Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/cmpi-network/ChangeLog,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ChangeLog 12 May 2005 15:18:35 -0000 1.4 +++ ChangeLog 28 Jul 2005 15:28:50 -0000 1.5 @@ -1,3 +1,9 @@ +2005-07-28 <mih...@dy...> + + * provider-register.sh: + Bug 1236584: enhance compatibilty with tog-pegasus style + installation. + 2005-05-12 <mih...@dy...> * provider-register.sh: Updated for OpenWBEM support. |
From: Viktor M. <mih...@us...> - 2005-07-28 15:25:58
|
Update of /cvsroot/sblim/cmpi-fsvol In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13528 Modified Files: ChangeLog NEWS provider-register.sh Log Message: Bug fixed: 1236584. Enhance compatibility with tog-pegasus installations. Index: NEWS =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/NEWS,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- NEWS 1 Jun 2005 12:28:35 -0000 1.4 +++ NEWS 28 Jul 2005 15:25:36 -0000 1.5 @@ -1,3 +1,9 @@ +Changes in 1.4.2 +================ + +Bugs: +- 1236584 Enhance tog-pegasus compatibility + Changes in 1.4.1 ================ Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/provider-register.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- provider-register.sh 12 May 2005 15:21:33 -0000 1.3 +++ provider-register.sh 28 Jul 2005 15:25:36 -0000 1.4 @@ -16,6 +16,19 @@ # registration data for a variety of supported CIMOMs # ================================================================== +function pegasus_repository() +{ + for p in /var/lib/pegasus /usr/local/var/lib/pegasus \ + /var/local/lib/pegasus /var/opt/tog-pegasus $PEGASUS_HOME + do + if test -d $p/repository + then + echo $p/$1 + return 0 + fi + done + return 1 +} function pegasus_path() { @@ -79,10 +92,12 @@ done #produce Capabilities + let serial=0 for rf in $regfiles do cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS do + let serial=serial+1 numcap= for cap in $CAPS do @@ -121,7 +136,7 @@ Namespaces = {"$NAMESPACE"}; SupportedProperties = NULL; SupportedMethods = NULL; - CapabilityID = "1"; + CapabilityID = "$serial"; }; EOFC @@ -147,6 +162,13 @@ echo "Error: cimmof not found" >&2 return 1 fi + PEGASUSREPOSITORY=`pegasus_repository` + if test $? != 0 + then + echo "Error: pegasus repository not found" >&2 + return 1 + fi + CIMMOF="$CIMMOF -R $PEGASUSREPOSITORY" state=inactive fi @@ -241,7 +263,7 @@ echo "Error: wbemexec not found" >&2 return 1 fi - CLASSES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 1` + CLASSES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 1 | grep -v '^CIM_'` for cls in $CLASSES do chatter Delete CIM Class $cls Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/ChangeLog,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ChangeLog 1 Jun 2005 12:28:35 -0000 1.6 +++ ChangeLog 28 Jul 2005 15:25:35 -0000 1.7 @@ -1,3 +1,9 @@ +2005-07-28 <mih...@dy...> + + * provider-register.sh: + Bug 1236584: enhance compatibilty with tog-pegasus style + installation. + 2005-06-01 <mih...@dy...> * cmpiOSBase_BlockStorageStatisticalDataProvider.c: |
From: Viktor M. <mih...@us...> - 2005-07-28 14:35:05
|
Update of /cvsroot/sblim/wbemcli In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32086 Modified Files: sblim-wbemcli.spec.in Log Message: Removed superfluous changelog entry. Index: sblim-wbemcli.spec.in =================================================================== RCS file: /cvsroot/sblim/wbemcli/sblim-wbemcli.spec.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- sblim-wbemcli.spec.in 28 Jul 2005 12:25:23 -0000 1.3 +++ sblim-wbemcli.spec.in 28 Jul 2005 14:34:55 -0000 1.4 @@ -41,6 +41,5 @@ %{_mandir}/man1/* %changelog -%changelog * Thu Jul 28 2005 Viktor Mihajlovski <mih...@de...> %{version}-%{release} - Updates for rpmlint complaints |
Update of /cvsroot/sblim/testsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26338 Modified Files: AUTHORS COPYING ChangeLog NEWS associator.pm cimom.pm configure.ac consistence.pm instance.pm sblim-testsuite.spec.in Log Message: Bugs fixed: 1236584. Enhancements in RPM Build Process. Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/testsuite/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- configure.ac 31 May 2005 14:13:18 -0000 1.2 +++ configure.ac 28 Jul 2005 14:13:23 -0000 1.3 @@ -3,7 +3,7 @@ # PUT YOUR PACKAGE INFO HERE. e.g. #AC_INIT(<PACKAGE_NAME>, <PACKAGE_VERSION>, <PACKAGE_BUGREPORT>, <PACKAGE_TARBALL>) -AC_INIT(SBLIM Testsuite, 1.2.2, sbl...@li..., sblim-testsuite) +AC_INIT(SBLIM Testsuite, 1.2.3, sbl...@li..., sblim-testsuite) # CHANGE THIS TO THE RELATIVE PATHNAME OF *ONE* OF THE SOURCE FILES AC_CONFIG_SRCDIR([run.sh]) Index: associator.pm =================================================================== RCS file: /cvsroot/sblim/testsuite/associator.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- associator.pm 14 Jun 2005 16:21:51 -0000 1.14 +++ associator.pm 28 Jul 2005 14:13:22 -0000 1.15 @@ -1,3 +1,4 @@ +#!/usr/bin/perl # # associator.pm # Index: COPYING =================================================================== RCS file: /cvsroot/sblim/testsuite/COPYING,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- COPYING 14 Apr 2005 10:38:49 -0000 1.1 +++ COPYING 28 Jul 2005 14:13:22 -0000 1.2 @@ -0,0 +1,213 @@ +Common Public License Version 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC +LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM +CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial code and +documentation distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + + i) changes to the Program, and + + ii) additions to the Program; + + where such changes and/or additions to the Program originate from and are +distributed by that particular Contributor. A Contribution 'originates' from a +Contributor if it was added to the Program by such Contributor itself or anyone +acting on such Contributor's behalf. Contributions do not include additions to +the Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) are not +derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents " mean patent claims licensable by a Contributor which are +necessarily infringed by the use or sale of its Contribution alone or when +combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, +including all Contributors. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free copyright license to +reproduce, prepare derivative works of, publicly display, publicly perform, +distribute and sublicense the Contribution of such Contributor, if any, and such +derivative works, in source code and object code form. + + b) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed +Patents to make, use, sell, offer to sell, import and otherwise transfer the +Contribution of such Contributor, if any, in source code and object code form. +This patent license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, such +addition of the Contribution causes such combination to be covered by the +Licensed Patents. The patent license shall not apply to any other combinations +which include the Contribution. No hardware per se is licensed hereunder. + + c) Recipient understands that although each Contributor grants the licenses +to its Contributions set forth herein, no assurances are provided by any +Contributor that the Program does not infringe the patent or other intellectual +property rights of any other entity. Each Contributor disclaims any liability to +Recipient for claims brought by any other entity based on infringement of +intellectual property rights or otherwise. As a condition to exercising the +rights and licenses granted hereunder, each Recipient hereby assumes sole +responsibility to secure any other intellectual property rights needed, if any. +For example, if a third party patent license is required to allow Recipient to +distribute the Program, it is Recipient's responsibility to acquire that license +before distributing the Program. + + d) Each Contributor represents that to its knowledge it has sufficient +copyright rights in its Contribution, if any, to grant the copyright license set +forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its +own license agreement, provided that: + + a) it complies with the terms and conditions of this Agreement; and + + b) its license agreement: + + i) effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title and +non-infringement, and implied warranties or conditions of merchantability and +fitness for a particular purpose; + + ii) effectively excludes on behalf of all Contributors all liability for +damages, including direct, indirect, special, incidental and consequential +damages, such as lost profits; + + iii) states that any provisions which differ from this Agreement are offered +by that Contributor alone and not by any other party; and + + iv) states that source code for the Program is available from such +Contributor, and informs licensees how to obtain it in a reasonable manner on or +through a medium customarily used for software exchange. + +When the Program is made available in source code form: + + a) it must be made available under this Agreement; and + + b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the +Program. + +Each Contributor must identify itself as the originator of its Contribution, if +any, in a manner that reasonably allows subsequent Recipients to identify the +originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with +respect to end users, business partners and the like. While this license is +intended to facilitate the commercial use of the Program, the Contributor who +includes the Program in a commercial product offering should do so in a manner +which does not create potential liability for other Contributors. Therefore, if +a Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and indemnify +every other Contributor ("Indemnified Contributor") against any losses, damages +and costs (collectively "Losses") arising from claims, lawsuits and other legal +actions brought by a third party against the Indemnified Contributor to the +extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor to +control, and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may participate in +any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product +offering, Product X. That Contributor is then a Commercial Contributor. If that +Commercial Contributor then makes performance claims, or offers warranties +related to Product X, those performance claims and warranties are such +Commercial Contributor's responsibility alone. Under this section, the +Commercial Contributor would have to defend claims against the other +Contributors related to those performance claims and warranties, and if a court +requires any other Contributor to pay any damages as a result, the Commercial +Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each +Recipient is solely responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its exercise of +rights under this Agreement, including but not limited to the risks and costs of +program errors, compliance with applicable laws, damage to or loss of data, +programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY +CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS +GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable +law, it shall not affect the validity or enforceability of the remainder of the +terms of this Agreement, and without further action by the parties hereto, such +provision shall be reformed to the minimum extent necessary to make such +provision valid and enforceable. + +If Recipient institutes patent litigation against a Contributor with respect to +a patent applicable to software (including a cross-claim or counterclaim in a +lawsuit), then any patent licenses granted by that Contributor to such Recipient +under this Agreement shall terminate as of the date such litigation is filed. In +addition, if Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the Program +itself (excluding combinations of the Program with other software or hardware) +infringes such Recipient's patent(s), then such Recipient's rights granted under +Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to +comply with any of the material terms or conditions of this Agreement and does +not cure such failure in a reasonable period of time after becoming aware of +such noncompliance. If all Recipient's rights under this Agreement terminate, +Recipient agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this Agreement +and any licenses granted by Recipient relating to the Program shall continue and +survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in +order to avoid inconsistency the Agreement is copyrighted and may only be +modified in the following manner. The Agreement Steward reserves the right to +publish new versions (including revisions) of this Agreement from time to time. +No one other than the Agreement Steward has the right to modify this Agreement. +IBM is the initial Agreement Steward. IBM may assign the responsibility to serve +as the Agreement Steward to a suitable separate entity. Each new version of the +Agreement will be given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the Agreement +under which it was received. In addition, after a new version of the Agreement +is published, Contributor may elect to distribute the Program (including its +Contributions) under the new version. Except as expressly stated in Sections +2(a) and 2(b) above, Recipient receives no rights or licenses to the +intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to this +Agreement will bring a legal action under this Agreement more than one year +after the cause of action arose. Each party waives its rights to a jury trial in +any resulting litigation. Index: NEWS =================================================================== RCS file: /cvsroot/sblim/testsuite/NEWS,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- NEWS 31 May 2005 14:13:18 -0000 1.2 +++ NEWS 28 Jul 2005 14:13:22 -0000 1.3 @@ -1,3 +1,13 @@ +Changes in 1.2.3 +================ + +New features: +- added a new option -verbose, which will print out the wbemcli + commands before executing them + +Bugs fixed: +- 1236584 RPM Build Enhancements + Changes in 1.2.2 ================ Index: sblim-testsuite.spec.in =================================================================== RCS file: /cvsroot/sblim/testsuite/sblim-testsuite.spec.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sblim-testsuite.spec.in 14 Apr 2005 10:38:49 -0000 1.1 +++ sblim-testsuite.spec.in 28 Jul 2005 14:13:23 -0000 1.2 @@ -4,14 +4,16 @@ # Package spec for @PACKAGE@ # -BuildRoot: /var/tmp/buildroot +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} +BuildArch: noarch Summary: SBLIM testsuite Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ Release: 0 Group: Systems Management/Base -License: Common Public License 1.0 +URL: http://www.sourceforge.net +License: CPL Source0: http://prdownloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2 @@ -23,7 +25,7 @@ %prep -%setup -T -b 0 -n %{name}-%{version} +%setup export PATCH_GET=0 #%patch0 -p1 @@ -34,27 +36,19 @@ make %install - -if [ `id -ur` != 0 ] -then -# paranoia check - rm -rf $RPM_BUILD_ROOT -fi - +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install -%clean -if [ `id -ur` != 0 ] -then -# paranoia check - rm -rf $RPM_BUILD_ROOT -fi - -%post -%postun +%clean +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -/usr/share -/var/lib +%doc %{_datadir}/doc/%{name}-%{version} +%{_datadir}/%{name} +%{_localstatedir}/lib/%{name} + +%changelog +* Thu Jul 28 2005 Viktor Mihajlovski <mih...@de...> %{version}-%{release} + - Updates for rpmlint complaints Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/testsuite/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ChangeLog 31 May 2005 14:13:18 -0000 1.2 +++ ChangeLog 28 Jul 2005 14:13:22 -0000 1.3 @@ -1,3 +1,18 @@ +2005-07-28 <mih...@dy...> + + * run.sh: + By Adrian Schuur: support -verbose option. + + * associator.pm: + * cimom.pm: + * consistence.pm: + * associator.pm: + Bug 1236584: made rpmlint-friendly. + By Adrian Schuur: support -verbose option. + + * sblim-testsuite.spec.in: + Bug 1236584: made rpmlint-friendly. + 2005-05-31 <mih...@dy...> * Makefile.am: Index: instance.pm =================================================================== RCS file: /cvsroot/sblim/testsuite/instance.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- instance.pm 14 Jun 2005 16:21:59 -0000 1.14 +++ instance.pm 28 Jul 2005 14:13:23 -0000 1.15 @@ -1,3 +1,4 @@ +#!/usr/bin/perl # # instance.pm # Index: cimom.pm =================================================================== RCS file: /cvsroot/sblim/testsuite/cimom.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- cimom.pm 21 Jun 2004 17:43:43 -0000 1.8 +++ cimom.pm 28 Jul 2005 14:13:22 -0000 1.9 @@ -1,3 +1,4 @@ +#!/usr/bin/perl # # cimom.pm # Index: consistence.pm =================================================================== RCS file: /cvsroot/sblim/testsuite/consistence.pm,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- consistence.pm 14 Jun 2005 16:21:59 -0000 1.30 +++ consistence.pm 28 Jul 2005 14:13:23 -0000 1.31 @@ -1,3 +1,4 @@ +#!/usr/bin/perl # # consistence.pm # Index: AUTHORS =================================================================== RCS file: /cvsroot/sblim/testsuite/AUTHORS,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- AUTHORS 14 Apr 2005 10:38:49 -0000 1.1 +++ AUTHORS 28 Jul 2005 14:13:22 -0000 1.2 @@ -0,0 +1 @@ +Original author of this package is Heidi Eckhart <hei...@de...> |
From: Viktor M. <mih...@us...> - 2005-07-28 12:25:40
|
Update of /cvsroot/sblim/wbemcli In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4507 Modified Files: configure.ac sblim-wbemcli.spec.in Log Message: Editorial changes in RPM spec file. Index: sblim-wbemcli.spec.in =================================================================== RCS file: /cvsroot/sblim/wbemcli/sblim-wbemcli.spec.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sblim-wbemcli.spec.in 13 Jul 2005 14:51:43 -0000 1.2 +++ sblim-wbemcli.spec.in 28 Jul 2005 12:25:23 -0000 1.3 @@ -9,16 +9,17 @@ Version: @PACKAGE_VERSION@ Release: 0 Group: Systems Management/Base -License: Common Public Licence 1.0 -Packager: Viktor Mihajlovski <mih...@de...> -Source0: http://prdownloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2 -BuildRoot: %{_tmppath}/buildroot +URL: http://www.sblim.org +License: CPL +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} BuildRequires: curl-devel >= 7.9.3 Requires: curl >= 7.9.3 +Source0: http://prdownloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2 + %Description WBEM Command Line Interface is a standalone, command line WBEM client. It is -especially suited for basic systems management tasks as it can be used in +specially suited for basic systems management tasks as it can be used in scripts. %prep @@ -38,3 +39,8 @@ %defattr(-,root,root) %{_bindir}/wbem* %{_mandir}/man1/* + +%changelog +%changelog +* Thu Jul 28 2005 Viktor Mihajlovski <mih...@de...> %{version}-%{release} + - Updates for rpmlint complaints Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/wbemcli/configure.ac,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- configure.ac 13 Jul 2005 14:51:43 -0000 1.11 +++ configure.ac 28 Jul 2005 12:25:23 -0000 1.12 @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_INIT(SBLIM WBEMCLI, 1.4.10b, sbl...@li...,sblim-wbemcli) +AC_INIT(SBLIM WBEMCLI, 1.4.11, sbl...@li...,sblim-wbemcli) AC_CONFIG_SRCDIR([CimXml.cpp]) AC_CANONICAL_HOST |
From: Viktor M. <mih...@us...> - 2005-07-28 11:24:43
|
Update of /cvsroot/sblim/cmpi-devel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24845 Modified Files: COPYING ChangeLog NEWS configure.ac sblim-cmpi-devel.spec.in Log Message: Bugs fixed: 1236584. Minor enhancements of the RPM spec file. Index: NEWS =================================================================== RCS file: /cvsroot/sblim/cmpi-devel/NEWS,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NEWS 13 May 2005 14:31:42 -0000 1.3 +++ NEWS 28 Jul 2005 11:24:30 -0000 1.4 @@ -1,3 +1,9 @@ +Changes in 1.0.2 +================ + +Bugs fixed: +- 1236584 Fixed some rpmlint warnings in the spec file. + Changes in 1.0.1 ================ Index: sblim-cmpi-devel.spec.in =================================================================== RCS file: /cvsroot/sblim/cmpi-devel/sblim-cmpi-devel.spec.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sblim-cmpi-devel.spec.in 18 Mar 2005 15:13:31 -0000 1.1 +++ sblim-cmpi-devel.spec.in 28 Jul 2005 11:24:30 -0000 1.2 @@ -4,18 +4,19 @@ # Package spec for cmpi-devel # -BuildRoot: /var/tmp/buildroot +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Summary: SBLIM CMPI Provider Development Support Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ Release: 0 Group: Systems Management/Base -License: Common Public License 1.0 +URL: http://www.sblim.org +License: CPL Provides: cmpi-devel -Source0: http://dl.sourceforge.net/sourceforge/sblim/%{name}-%{version}.tar.bz2 +Source0: http://prdownloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2 %Description This packages provides the CMPI header files needed by provider developers @@ -34,12 +35,7 @@ make %install - -if [ `id -ur` != 0 ] -then -# paranoia check - rm -rf $RPM_BUILD_ROOT -fi +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install @@ -47,15 +43,18 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*a %clean -if [ `id -ur` != 0 ] -then -# paranoia check - rm -rf $RPM_BUILD_ROOT -fi - +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%doc %{_datadir}/doc -%{_includedir} +%doc %{_datadir}/doc/%{name}-%{version} +%{_includedir}/cmpi %{_libdir}/*.so* + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%changelog +* Thu Jul 28 2005 Viktor Mihajlovski <mih...@de...> %{version}-%{release} + - Updates for rpmlint complaints Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/cmpi-devel/configure.ac,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- configure.ac 13 May 2005 14:31:42 -0000 1.4 +++ configure.ac 28 Jul 2005 11:24:30 -0000 1.5 @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_INIT(sblim-cmpi-devel, 1.0.1, <mih...@de...>) +AC_INIT(sblim-cmpi-devel, 1.0.2, <sbl...@li...>) AC_CONFIG_SRCDIR([CmpiImpl.cpp]) AC_CONFIG_HEADER([config.h]) Index: COPYING =================================================================== RCS file: /cvsroot/sblim/cmpi-devel/COPYING,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- COPYING 18 Mar 2005 13:45:38 -0000 1.1.1.1 +++ COPYING 28 Jul 2005 11:24:30 -0000 1.2 @@ -1,125 +1,213 @@ -<HTML> -<HEAD> -<META Name="Generator" Content="Lotus Word Pro"></META> -<TITLE>Body</TITLE> - -</HEAD> - -<BODY BGCOLOR="#FFFFFF" VLINK="#800000"> - - -<P ALIGN="CENTER"><B>Common Public License - v 1.0</B> -<P><B></B><FONT SIZE="3"></FONT> -<P><FONT SIZE="3"></FONT><FONT SIZE="2">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.</FONT> -<P><FONT SIZE="2"></FONT> -<P><FONT SIZE="2"><B>1. DEFINITIONS</B></FONT> -<P><FONT SIZE="2">"Contribution" means:</FONT> - -<UL><FONT SIZE="2">a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and<BR CLEAR="LEFT"> -b) in the case of each subsequent Contributor:</FONT></UL> - - -<UL><FONT SIZE="2">i) changes to the Program, and</FONT></UL> - - -<UL><FONT SIZE="2">ii) additions to the Program;</FONT></UL> - - -<UL><FONT SIZE="2">where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. </FONT><FONT SIZE="2">A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. </FONT><FONT SIZE="2">Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. </FONT></UL> - -<P><FONT SIZE="2"></FONT> -<P><FONT SIZE="2">"Contributor" means any person or entity that distributes the Program.</FONT> -<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT> -<P><FONT SIZE="2">"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. </FONT> -<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT> -<P><FONT SIZE="2"></FONT><FONT SIZE="2">"Program" means the Contributions distributed in accordance with this Agreement.</FONT> -<P><FONT SIZE="2"></FONT> -<P><FONT SIZE="2">"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.</FONT> -<P><FONT SIZE="2"><B></B></FONT> -<P><FONT SIZE="2"><B>2. GRANT OF RIGHTS</B></FONT> - -<UL><FONT SIZE="2"></FONT><FONT SIZE="2">a) </FONT><FONT SIZE="2">Subject to the terms of this Agreement, each Contributor hereby grants</FONT><FONT SIZE="2"> Recipient a non-exclusive, worldwide, royalty-free copyright license to</FONT><FONT SIZE="2" COLOR="#FF0000"> </FONT><FONT SIZE="2">reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.</FONT></UL> - - -<UL><FONT SIZE="2"></FONT></UL> - - -<UL><FONT SIZE="2"></FONT><FONT SIZE="2">b) Subject to the terms of this Agreement, each Contributor hereby grants </FONT><FONT SIZE="2">Recipient a non-exclusive, worldwide,</FONT><FONT SIZE="2" COLOR="#008000"> </FONT><FONT SIZE="2">royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. </FONT></UL> - - -<UL><FONT SIZE="2"></FONT></UL> - - -<UL><FONT SIZE="2">c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.</FONT></UL> - - -<UL><FONT SIZE="2"></FONT></UL> - - -<UL><FONT SIZE="2">d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. </FONT></UL> - - -<UL><FONT SIZE="2"></FONT></UL> - -<P><FONT SIZE="2"><B>3. REQUIREMENTS</B></FONT> -<P><FONT SIZE="2"><B></B>A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:</FONT> - -<UL><FONT SIZE="2">a) it complies with the terms and conditions of this Agreement; and</FONT></UL> - - -<UL><FONT SIZE="2">b) its license agreement:</FONT></UL> - - -<UL><FONT SIZE="2">i) effectively disclaims</FONT><FONT SIZE="2" FACE="Times New Roman"> on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; </FONT></UL> - - -<UL><FONT SIZE="2" FACE="Times New Roman">ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; </FONT></UL> - - -<UL><FONT SIZE="2" FACE="Times New Roman">iii)</FONT><FONT SIZE="2"> states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and</FONT></UL> - - -<UL><FONT SIZE="2">iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.</FONT><FONT SIZE="2" COLOR="#0000FF"> </FONT><FONT SIZE="2" COLOR="#FF0000"></FONT></UL> - - -<UL><FONT SIZE="2" COLOR="#FF0000"></FONT><FONT SIZE="2"></FONT></UL> - -<P><FONT SIZE="2">When the Program is made available in source code form:</FONT> - -<UL><FONT SIZE="2">a) it must be made available under this Agreement; and </FONT></UL> - - -<UL><FONT SIZE="2">b) a copy of this Agreement must be included with each copy of the Program. </FONT></UL> - -<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT> -<P><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT><FONT SIZE="2">Contributors may not remove or alter any copyright notices contained within the Program. </FONT> -<P><FONT SIZE="2"></FONT> -<P><FONT SIZE="2">Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. </FONT> -<P><FONT SIZE="2"></FONT> -<P><FONT SIZE="2"><B>4. COMMERCIAL DISTRIBUTION</B></FONT> -<P><FONT SIZE="2">Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.</FONT> -<P><FONT SIZE="2"></FONT> -<P><FONT SIZE="2">For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.</FONT> -<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"></FONT> -<P><FONT SIZE="2" COLOR="#0000FF"></FONT><FONT SIZE="2"><B>5. NO WARRANTY</B></FONT> -<P><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is</FONT><FONT SIZE="2"> solely responsible for determining the appropriateness of using and distributing </FONT><FONT SIZE="2">the Program</FONT><FONT SIZE="2"> and assumes all risks associated with its exercise of rights under this Agreement</FONT><FONT SIZE="2">, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, </FONT><FONT SIZE="2">programs or equipment, and unavailability or interruption of operations</FONT><FONT SIZE="2">. </FONT><FONT SIZE="2"></FONT> -<P><FONT SIZE="2"></FONT> -<P><FONT SIZE="2"></FONT><FONT SIZE="2"><B>6. DISCLAIMER OF LIABILITY</B></FONT> -<P><FONT SIZE="2"></FONT><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES </FONT><FONT SIZE="2" FACE="Times New Roman">(INCLUDING WITHOUT LIMITATION LOST PROFITS),</FONT><FONT SIZE="2"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</FONT> -<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT> -<P><FONT SIZE="2"><B>7. GENERAL</B></FONT> -<P><FONT SIZE="2"></FONT><FONT SIZE="2">If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.</FONT> -<P><FONT SIZE="2"></FONT> -<P><FONT SIZE="2">If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. </FONT><FONT SIZE="2"></FONT> -<P><FONT SIZE="2"></FONT> -<P><FONT SIZE="2">All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. </FONT><FONT SIZE="2"></FONT> -<P><FONT SIZE="2"></FONT> -<P><FONT SIZE="2"></FONT><FONT SIZE="2" FACE="Times New Roman">Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to </FONT><FONT SIZE="2">publish new versions (including revisions) of this Agreement from time to </FONT><FONT SIZE="2" FACE="Times New Roman">time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. </FONT><FONT SIZE="2">Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new </FONT><FONT SIZE="2" FACE="Times New Roman">version. </FONT><FONT SIZE="2">Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, </FONT><FONT SIZE="2">by implication, estoppel or otherwise</FONT><FONT SIZE="2">.</FONT><FONT SIZE="2"> All rights in the Program not expressly granted under this Agreement are reserved.</FONT> -<P><FONT SIZE="2"></FONT> -<P><FONT SIZE="2">This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.</FONT> -<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT> -<P><FONT SIZE="2"></FONT> - -</BODY> - -</HTML> \ No newline at end of file +Common Public License Version 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC +LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM +CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial code and +documentation distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + + i) changes to the Program, and + + ii) additions to the Program; + + where such changes and/or additions to the Program originate from and are +distributed by that particular Contributor. A Contribution 'originates' from a +Contributor if it was added to the Program by such Contributor itself or anyone +acting on such Contributor's behalf. Contributions do not include additions to +the Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) are not +derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents " mean patent claims licensable by a Contributor which are +necessarily infringed by the use or sale of its Contribution alone or when +combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, +including all Contributors. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free copyright license to +reproduce, prepare derivative works of, publicly display, publicly perform, +distribute and sublicense the Contribution of such Contributor, if any, and such +derivative works, in source code and object code form. + + b) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed +Patents to make, use, sell, offer to sell, import and otherwise transfer the +Contribution of such Contributor, if any, in source code and object code form. +This patent license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, such +addition of the Contribution causes such combination to be covered by the +Licensed Patents. The patent license shall not apply to any other combinations +which include the Contribution. No hardware per se is licensed hereunder. + + c) Recipient understands that although each Contributor grants the licenses +to its Contributions set forth herein, no assurances are provided by any +Contributor that the Program does not infringe the patent or other intellectual +property rights of any other entity. Each Contributor disclaims any liability to +Recipient for claims brought by any other entity based on infringement of +intellectual property rights or otherwise. As a condition to exercising the +rights and licenses granted hereunder, each Recipient hereby assumes sole +responsibility to secure any other intellectual property rights needed, if any. +For example, if a third party patent license is required to allow Recipient to +distribute the Program, it is Recipient's responsibility to acquire that license +before distributing the Program. + + d) Each Contributor represents that to its knowledge it has sufficient +copyright rights in its Contribution, if any, to grant the copyright license set +forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its +own license agreement, provided that: + + a) it complies with the terms and conditions of this Agreement; and + + b) its license agreement: + + i) effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title and +non-infringement, and implied warranties or conditions of merchantability and +fitness for a particular purpose; + + ii) effectively excludes on behalf of all Contributors all liability for +damages, including direct, indirect, special, incidental and consequential +damages, such as lost profits; + + iii) states that any provisions which differ from this Agreement are offered +by that Contributor alone and not by any other party; and + + iv) states that source code for the Program is available from such +Contributor, and informs licensees how to obtain it in a reasonable manner on or +through a medium customarily used for software exchange. + +When the Program is made available in source code form: + + a) it must be made available under this Agreement; and + + b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the +Program. + +Each Contributor must identify itself as the originator of its Contribution, if +any, in a manner that reasonably allows subsequent Recipients to identify the +originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with +respect to end users, business partners and the like. While this license is +intended to facilitate the commercial use of the Program, the Contributor who +includes the Program in a commercial product offering should do so in a manner +which does not create potential liability for other Contributors. Therefore, if +a Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and indemnify +every other Contributor ("Indemnified Contributor") against any losses, damages +and costs (collectively "Losses") arising from claims, lawsuits and other legal +actions brought by a third party against the Indemnified Contributor to the +extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor to +control, and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may participate in +any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product +offering, Product X. That Contributor is then a Commercial Contributor. If that +Commercial Contributor then makes performance claims, or offers warranties +related to Product X, those performance claims and warranties are such +Commercial Contributor's responsibility alone. Under this section, the +Commercial Contributor would have to defend claims against the other +Contributors related to those performance claims and warranties, and if a court +requires any other Contributor to pay any damages as a result, the Commercial +Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each +Recipient is solely responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its exercise of +rights under this Agreement, including but not limited to the risks and costs of +program errors, compliance with applicable laws, damage to or loss of data, +programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY +CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS +GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable +law, it shall not affect the validity or enforceability of the remainder of the +terms of this Agreement, and without further action by the parties hereto, such +provision shall be reformed to the minimum extent necessary to make such +provision valid and enforceable. + +If Recipient institutes patent litigation against a Contributor with respect to +a patent applicable to software (including a cross-claim or counterclaim in a +lawsuit), then any patent licenses granted by that Contributor to such Recipient +under this Agreement shall terminate as of the date such litigation is filed. In +addition, if Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the Program +itself (excluding combinations of the Program with other software or hardware) +infringes such Recipient's patent(s), then such Recipient's rights granted under +Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to +comply with any of the material terms or conditions of this Agreement and does +not cure such failure in a reasonable period of time after becoming aware of +such noncompliance. If all Recipient's rights under this Agreement terminate, +Recipient agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this Agreement +and any licenses granted by Recipient relating to the Program shall continue and +survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in +order to avoid inconsistency the Agreement is copyrighted and may only be +modified in the following manner. The Agreement Steward reserves the right to +publish new versions (including revisions) of this Agreement from time to time. +No one other than the Agreement Steward has the right to modify this Agreement. +IBM is the initial Agreement Steward. IBM may assign the responsibility to serve +as the Agreement Steward to a suitable separate entity. Each new version of the +Agreement will be given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the Agreement +under which it was received. In addition, after a new version of the Agreement +is published, Contributor may elect to distribute the Program (including its +Contributions) under the new version. Except as expressly stated in Sections +2(a) and 2(b) above, Recipient receives no rights or licenses to the +intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to this +Agreement will bring a legal action under this Agreement more than one year +after the cause of action arose. Each party waives its rights to a jury trial in +any resulting litigation. Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/cmpi-devel/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ChangeLog 13 May 2005 14:31:42 -0000 1.3 +++ ChangeLog 28 Jul 2005 11:24:30 -0000 1.4 @@ -1,3 +1,8 @@ +2005-07-28 <mih...@dy...> + + * sblim-cmpi-devel.spec.in: + Bug 1236584: Changes for rpmlint complaints. + 2005-05-13 <mih...@dy...> * CmpiImpl.cpp: |
From: Viktor M. <mih...@us...> - 2005-07-28 10:37:01
|
Update of /cvsroot/sblim/cmpi-base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16354 Modified Files: ChangeLog NEWS configure.ac dmiinfo.c sblim-cmpi-base.spec.in Log Message: Bugs fixed: 1236584, 1246639. RPM Build Enhancements. Removed debug output. Index: sblim-cmpi-base.spec.in =================================================================== RCS file: /cvsroot/sblim/cmpi-base/sblim-cmpi-base.spec.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- sblim-cmpi-base.spec.in 27 Jul 2005 16:01:09 -0000 1.9 +++ sblim-cmpi-base.spec.in 28 Jul 2005 10:36:51 -0000 1.10 @@ -8,7 +8,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -Summary: Sample CMPI Provider +Summary: SBLIM Base Providers Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ Release: 1%{?tog_pegasus:.tog_pegasus} @@ -22,7 +22,8 @@ Requires: %{?tog_pegasus:tog-pegasus}%{!?tog_pegasus:cimserver} %Description -Standards Based Linux Instrumentation Base Providers +Standards Based Linux Instrumentation Base CMPI Providers for +System-related CIM classes %Package devel Summary: SBLIM Base Instrumentation Header Development Files @@ -30,7 +31,9 @@ Requires: %{name} = %{version} %Description devel -SBLIM Base Provider Development Package +SBLIM Base Provider Development Package contains header files and +link libraries +for dependent provider packages %Package test Summary: SBLIM Base Instrumentation Testcase Files @@ -77,9 +80,8 @@ %endif -%post -# Register Schema and Provider - this is higly provider specific - +%pre +# Conditional definition of schema and registration files %if "@LINDHELP@" != "" %define SCHEMA %{_datadir}/%{name}/Linux_Base.mof %{_datadir}/%{name}/Linux_BaseIndication.mof %define REGISTRATION %{_datadir}/%{name}/Linux_BaseIndication.registration @@ -88,17 +90,35 @@ %define REGISTRATION %{_datadir}/%{name}/Linux_Base.registration %endif +# If upgrading, deregister old version +if [ $1 -gt 1 ] +then + %{_datadir}/%{name}/provider-register.sh -d %{?tog_pegasus:-t pegasus} \ + -r %{REGISTRATION} -m %{SCHEMA} > /dev/null +fi + +%post +# Register Schema and Provider - this is higly provider specific + %{_datadir}/%{name}/provider-register.sh %{?tog_pegasus:-t pegasus} \ -r %{REGISTRATION} -m %{SCHEMA} > /dev/null /sbin/ldconfig %preun - -%{_datadir}/%{name}/provider-register.sh -d %{?tog_pegasus:-t pegasus} \ +# Deregister only if not upgrading +if [ $1 -eq 0 ] +then + %{_datadir}/%{name}/provider-register.sh -d %{?tog_pegasus:-t pegasus} \ -r %{REGISTRATION} -m %{SCHEMA} > /dev/null +fi -%postun -p /sbin/ldconfig +%postun +# Run ldconfig only if not upgrading +if [ $1 -eq 0 ] +then + /sbin/ldconfig +fi %files Index: NEWS =================================================================== RCS file: /cvsroot/sblim/cmpi-base/NEWS,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- NEWS 12 Jul 2005 13:06:54 -0000 1.8 +++ NEWS 28 Jul 2005 10:36:51 -0000 1.9 @@ -4,6 +4,7 @@ Bugs Fixed: - 1222571 Fixed segmentation fault on long process command lines. - 1236584 Better support for the peculiarities of tog-pegasus +- 1246639 Removed debug output from libdmi Changes in 1.5.2 ================ Index: dmiinfo.c =================================================================== RCS file: /cvsroot/sblim/cmpi-base/dmiinfo.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- dmiinfo.c 24 Jan 2005 11:29:05 -0000 1.1 +++ dmiinfo.c 28 Jul 2005 10:36:51 -0000 1.2 @@ -71,10 +71,12 @@ /* find DMI anchor */ for (dmif=biosptr;(void*)dmif<(biosptr+bioslen);dmif++) { if (memcmp("_DMI_",dmif->dmi_sig,5)==0) { +#ifdef DEBUG printf("DMI Signature found at %08x\n", (void*)dmif-biosptr+offbios); printf("SMBIOS Structures reside at %08x\n", dmif->dmi_base); +#endif break; } } Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/cmpi-base/configure.ac,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- configure.ac 26 Jul 2005 13:51:07 -0000 1.10 +++ configure.ac 28 Jul 2005 10:36:51 -0000 1.11 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(SBLIM BaseOS Providers Base, 1.5.2b, sbl...@li...,sblim-cmpi-base) +AC_INIT(SBLIM BaseOS Providers Base, 1.5.3, sbl...@li...,sblim-cmpi-base) AC_CONFIG_SRCDIR([OSBase_Common.c]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/cmpi-base/ChangeLog,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ChangeLog 12 Jul 2005 13:06:54 -0000 1.12 +++ ChangeLog 28 Jul 2005 10:36:51 -0000 1.13 @@ -1,3 +1,16 @@ +2005-07-28 <mih...@dy...> + + * dmiinfo.c: + Bug 1246639: Unwanted debug output removed. + + * Makefile.am: + Bug 1236584: Added per provider LDFLAGS to suppress version number + generation, as rpmlint doesn't like .so.n.n files and .so files + in the same RPM. + + * sblim-cmpi-base.spec.in: + Bug 1236584: Modified scriptlets to support RPM upgrade. + 2005-07-12 <mih...@dy...> * provider-register.sh: |
From: Viktor M. <mih...@us...> - 2005-07-28 08:09:48
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21706 Modified Files: sfcb.init-suse.in Log Message: Bugs fixed: 1242508. Typo rcstatus instead of rc_status fixed. Index: sfcb.init-suse.in =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.init-suse.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sfcb.init-suse.in 13 Jun 2005 12:50:33 -0000 1.2 +++ sfcb.init-suse.in 28 Jul 2005 08:09:38 -0000 1.3 @@ -24,19 +24,19 @@ start() { echo -n "Starting sfcb: " startproc @sbindir@/sfcbd -d - rcstatus -v + rc_status -v } stop() { echo -n "Shutting down sfcb: " killproc sfcbd - rcstatus -v + rc_status -v } reload() { echo -n "Reloading sfcb configuration: " killproc -HUP sfcbd - rcstatus -v + rc_status -v } case "$1" in |
From: Adrian S. <a3s...@us...> - 2005-07-27 18:41:17
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1283 Modified Files: fileRepository.c internalProvider.c Log Message: Fixed [ 1246249 ] sfcb fails to correctly locate repository Added getRepDir() routine. Index: internalProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/internalProvider.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- internalProvider.c 26 Apr 2005 14:11:19 -0000 1.4 +++ internalProvider.c 27 Jul 2005 18:41:01 -0000 1.5 @@ -467,7 +467,7 @@ if (addBlob(nss,cns,key,blob,(int)len)) { CMPIStatus st = { CMPI_RC_ERR_FAILED, NULL }; - st.msg=native_new_CMPIString("Unable to write to repsoitory",NULL); + st.msg=native_new_CMPIString("Unable to write to repository",NULL); return st; } Index: fileRepository.c =================================================================== RCS file: /cvsroot/sblim/sfcb/fileRepository.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- fileRepository.c 26 Apr 2005 21:58:47 -0000 1.2 +++ fileRepository.c 27 Jul 2005 18:41:01 -0000 1.3 @@ -28,13 +28,38 @@ #include <string.h> #include <ctype.h> #include <unistd.h> + +#include <sys/types.h> +#include <dirent.h> #include <errno.h> + #include "fileRepository.h" #include "mlog.h" #define BASE "repository" +static char *repfn=NULL; + +char *getRepDir() +{ + int keyl; + char *dir; + + if (repfn) return repfn; + + if (getControlChars("registrationDir",&dir)) { + dir = "/var/lib/sfcb/registration"; + } + keyl=strlen(BASE)+strlen(dir); + repfn=(char*)malloc(keyl+64); + + strcpy(repfn,dir); + strcat(repfn,"/"); + strcat(repfn,BASE); + strcat(repfn,"/"); + return repfn; +} void freeBlobIndex(BlobIndex **bip, int all) { @@ -192,13 +217,19 @@ int getIndex(char *ns, char *cls, int elen, int mki, BlobIndex **bip) { BlobIndex *bi; - char *fn=alloca(elen); + char *fn; char *p; + char *dir; + int keyl; + dir=getRepDir(); + + keyl=strlen(dir)+elen; + fn=alloca(elen); + bi=NEW(BlobIndex); - strcpy(fn,BASE); - strcat(fn,"/"); + strcpy(fn,dir); p=fn+strlen(fn); strcat(fn,ns); strcat(fn,"/"); @@ -376,26 +407,31 @@ int existingNameSpace(char *ns) { - int keyl=strlen(ns)+strlen(BASE); - char *fn=alloca(keyl+64),*p; - FILE *ft=NULL; + int keyl; + char *fn,*p; + char *dir; + DIR *d; - strcpy(fn,BASE); - strcat(fn,"/"); + dir=getRepDir(); + + keyl=strlen(ns)+strlen(dir); + fn=alloca(keyl+64); + + strcpy(fn,dir); p=fn+strlen(fn); strcat(fn,ns); - strcat(fn,"/"); - strcat(fn,"__test__"); while (*p) { *p=tolower(*p); p++; } #ifdef __MAIN__ printf("--- testing %s \n",fn); #endif - ft=fopen(fn,"w"); - if (ft==NULL) return 0; - fclose(ft); - remove(fn); + + if ((d=opendir(fn))==NULL) { + perror("opendir"); + return 0; + } + closedir(d); return 1; } |
From: Viktor M. <mih...@us...> - 2005-07-27 16:23:48
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3560 Modified Files: Makefile.am brokerUpc.c configure.ac msgqueue.c msgqueue.h providerDrv.c providerMgr.c sfcb.spec.in Log Message: Bugs fixed: 1246130, 1246009. Indications can now be disabled effectively. Endianness sensitivity removed from msgqueue data structures. Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/sfcb/configure.ac,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- configure.ac 13 Jul 2005 14:26:02 -0000 1.15 +++ configure.ac 27 Jul 2005 16:22:38 -0000 1.16 @@ -21,7 +21,7 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(Small Footprint CIM Broker, 0.9.0, sbl...@li..., sblim-sfcb) +AC_INIT(Small Footprint CIM Broker, 0.9.0b, sbl...@li..., sblim-sfcb) AC_CONFIG_SRCDIR([providerDrv.c]) AM_INIT_AUTOMAKE @@ -101,7 +101,8 @@ # Checks for libraries. AC_CHECK_LIB(pthread,main) AC_CHECK_LIB(dl,main) -if test "$enable_indications" = "yes"; then +if test "$enable_indications" == "yes"; then + AC_DEFINE(HAVE_INDICATIONS,,[Indication support enabled.]) AC_CHECK_LIB(curl,main) fi @@ -158,6 +159,7 @@ AC_SUBST(MOFC_DIR) fi +AM_CONDITIONAL(INDICATIONS,[test "$enable_indications" == "yes"]) AM_CONDITIONAL(JDBC,[test "$enable_jdbc" == "yes"]) AC_CONFIG_FILES([Makefile sfcb.spec sfcbrepos.sh sfcbstage.sh sfcbunstage.sh sfcb.cfg.pre getSchema.sh.pre sfcb.init-redhat sfcb.init-suse sfcb.init-none]) @@ -167,7 +169,7 @@ echo sfcb configuration complete echo configuration features: echo -e "debug"\\t"${enable_debug:-no}" -echo -e "indications"\\t"yes (cannot be disabled currently)" +echo -e "indications"\\t"${enable_indications}" echo -e "ssl"\\t"${enable_ssl:-no}" echo -e "jdbc"\\t"${enable_jdbc:-no}" echo ====================================================== Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/Makefile.am,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- Makefile.am 13 Jul 2005 08:41:22 -0000 1.27 +++ Makefile.am 27 Jul 2005 16:22:22 -0000 1.28 @@ -36,6 +36,7 @@ SUBDIRS=. $(MOFC_DIR) +if INDICATIONS lib_LTLIBRARIES = \ libsfcBrokerCore.la \ libsfcInternalProvider.la \ @@ -45,6 +46,16 @@ libsfcHttpAdapter.la \ libsfcBasicAuthentication.la \ libsfcIndCIMXMLHandler.la +else +lib_LTLIBRARIES = \ + libsfcBrokerCore.la \ + libsfcInternalProvider.la \ + libsfcInteropProvider.la \ + libsfcClassProvider.la \ + libsfcCimXmlCodec.la \ + libsfcHttpAdapter.la \ + libsfcBasicAuthentication.la +endif sbin_PROGRAMS = \ sfcbd @@ -173,7 +184,7 @@ libsfcIndCIMXMLHandler_la_SOURCES = \ indCIMXMLHandler.c \ indCIMXMLExport.c -libsfcIndCIMXMLHandler_la_LIBADD=-lsfcBrokerCore -lsfcInternalProvider -lsfcCimXmlCodec -lsfcHttpAdapter -lcurl +libsfcIndCIMXMLHandler_la_LIBADD=-lsfcBrokerCore -lsfcInternalProvider -lsfcCimXmlCodec -lsfcHttpAdapter libsfcClassProvider_la_SOURCES = \ classProvider.c Index: msgqueue.h =================================================================== RCS file: /cvsroot/sblim/sfcb/msgqueue.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- msgqueue.h 13 Apr 2005 15:15:41 -0000 1.2 +++ msgqueue.h 27 Jul 2005 16:22:42 -0000 1.3 @@ -55,13 +55,8 @@ #endif typedef struct _spMessageHdr { - union { - long type; - struct { - short type; - short xtra; - } ctl; - } type; + short type; + short xtra; int returnS; unsigned long totalSize; unsigned long segments; Index: providerDrv.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerDrv.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- providerDrv.c 26 Jul 2005 11:15:26 -0000 1.17 +++ providerDrv.c 27 Jul 2005 16:22:42 -0000 1.18 @@ -20,8 +20,6 @@ */ -#define SFCB_INCL_INDICATION_SUPPORT 1 - #include <signal.h> #include <pthread.h> #include <time.h> @@ -39,6 +37,11 @@ #include "queryOperation.h" #include "selectexp.h" #include "control.h" +#include "config.h" + +#ifdef HAVE_INDICATIONS +#define SFCB_INCL_INDICATION_SUPPORT 1 +#endif #define PROVCHARS(p) (p && *((char*)p)) ? (char*)p : NULL Index: brokerUpc.c =================================================================== RCS file: /cvsroot/sblim/sfcb/brokerUpc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- brokerUpc.c 31 May 2005 09:23:50 -0000 1.2 +++ brokerUpc.c 27 Jul 2005 16:22:38 -0000 1.3 @@ -20,8 +20,6 @@ */ -#define SFCB_INCL_INDICATION_SUPPORT 1 - #include <stdio.h> #include <stdlib.h> #include <error.h> @@ -33,6 +31,11 @@ #include "objectImpl.h" #include "msgqueue.h" #include "utilft.h" +#include "config.h" + +#ifdef HAVE_INDICATIONS +#define SFCB_INCL_INDICATION_SUPPORT 1 +#endif #ifdef SFCB_INCL_INDICATION_SUPPORT #include "selectexp.h" @@ -46,7 +49,9 @@ extern void memLinkObjectPath(CMPIObjectPath *op); extern ProviderInfo *activProvs; +#ifdef SFCB_INCL_INDICATION_SUPPORT extern NativeSelectExp *activFilters; +#endif extern CMPIObjectPath *TrackedCMPIObjectPath(const char *nameSpace, const char *className, CMPIStatus * rc); extern void setStatus(CMPIStatus *st, CMPIrc rc, char *msg); @@ -136,9 +141,9 @@ _SFCB_RETURN(st); #else + _SFCB_ENTER(TRACE_INDPROVIDER | TRACE_UPCALLS, "deliverIndication"); CMPIStatus rci = { CMPI_RC_ERR_NOT_SUPPORTED, NULL }; - if (rc) *rc = rci; - _SFCB_RETURN(NULL); + _SFCB_RETURN(rci); #endif } Index: sfcb.spec.in =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.spec.in,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- sfcb.spec.in 20 Jul 2005 08:40:38 -0000 1.11 +++ sfcb.spec.in 27 Jul 2005 16:22:47 -0000 1.12 @@ -38,7 +38,7 @@ %build -%configure --disable-debug +%configure --enable-debug --disable-indications make %install @@ -89,6 +89,7 @@ exit 0 %files schema +%defattr(-,root,root) %{_datadir}/sfcb/CIM %files -f _pkg_list Index: providerMgr.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerMgr.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- providerMgr.c 13 Jul 2005 14:26:02 -0000 1.13 +++ providerMgr.c 27 Jul 2005 16:22:45 -0000 1.14 @@ -21,8 +21,6 @@ */ -#define SFCB_INCL_INDICATION_SUPPORT 1 - #include <signal.h> #include <time.h> @@ -38,6 +36,10 @@ #include "selectexp.h" #include "config.h" +#ifdef HAVE_INDICATIONS +#define SFCB_INCL_INDICATION_SUPPORT 1 +#endif + #ifdef SFCB_IX86 #define SFCB_ASM(x) asm(x) #else Index: msgqueue.c =================================================================== RCS file: /cvsroot/sblim/sfcb/msgqueue.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- msgqueue.c 7 Jul 2005 13:06:31 -0000 1.8 +++ msgqueue.c 27 Jul 2005 16:22:40 -0000 1.9 @@ -254,12 +254,12 @@ _SFCB_TRACE(1, ("--- Received data segment %d bytes", *length)); } - if (spMsg.type.type == MSG_DATA) { + if (spMsg.type == MSG_DATA) { _SFCB_TRACE(1, ("--- Received %d bytes", *length)); _SFCB_RETURN(0); } - if (spMsg.type.ctl.xtra == MSG_X_EXTENDED_CTL_MSG) { + if (spMsg.xtra == MSG_X_EXTENDED_CTL_MSG) { *data = malloc(256); *length = 256; do { @@ -269,22 +269,22 @@ } while (mqg->teintr) ; } - switch (spMsg.type.ctl.xtra) { + switch (spMsg.xtra) { case MSG_X_PROVIDER: *length = spMsg.segments; *data = spMsg.provId; case MSG_X_INVALID_NAMESPACE: case MSG_X_PROVIDER_NOT_FOUND: case MSG_X_INVALID_CLASS: - _SFCB_RETURN(spMsg.type.ctl.xtra); + _SFCB_RETURN(spMsg.xtra); default: *data = NULL; - mlogf(M_ERROR,M_SHOW,"### %d ??? %ld-%d\n", currentProc, spMsg.type.type, - spMsg.type.ctl.xtra); + mlogf(M_ERROR,M_SHOW,"### %d ??? %ld-%d\n", currentProc, spMsg.type, + spMsg.xtra); abort(); } - _SFCB_RETURN(spMsg.type.ctl.xtra); + _SFCB_RETURN(spMsg.xtra); } int spRecvReq(int *s, int *from, void **data, unsigned long *length, MqgStat *mqg) @@ -317,8 +317,8 @@ static int spSendMsg(int *to, int *from, int n, struct iovec *iov, int size) { - SpMessageHdr spMsg = { {MSG_DATA}, *from, size }; - spMsg.type.ctl.type = MSG_DATA; + SpMessageHdr spMsg = { 0, 0, *from, size }; + spMsg.type = MSG_DATA; static char *em = "spSendMsg sending to"; struct msghdr msg; ssize_t rc; @@ -427,7 +427,7 @@ static int spSendCtl(int *to, int *from, short code, unsigned long count, void *data) { - SpMessageHdr spMsg = { {MSG_DATA}, *from, 0 }; + SpMessageHdr spMsg = { 0, 0, *from, 0 }; static char *em = "spSendCtl sending to"; struct msghdr msg; struct iovec iov[2]; @@ -456,8 +456,8 @@ msg.msg_iov = iov; msg.msg_iovlen = 1; - spMsg.type.ctl.type = MSG_CTL; - spMsg.type.ctl.xtra = code; + spMsg.type = MSG_CTL; + spMsg.xtra = code; spMsg.segments = count; spMsg.provId = data; |
From: Viktor M. <mih...@us...> - 2005-07-27 16:01:30
|
Update of /cvsroot/sblim/cmpi-base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30840 Modified Files: Makefile.am sblim-cmpi-base.spec.in Log Message: RPM build makeup to address some of rpmlint's complaints. Index: sblim-cmpi-base.spec.in =================================================================== RCS file: /cvsroot/sblim/cmpi-base/sblim-cmpi-base.spec.in,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- sblim-cmpi-base.spec.in 26 Jul 2005 13:51:07 -0000 1.8 +++ sblim-cmpi-base.spec.in 27 Jul 2005 16:01:09 -0000 1.9 @@ -67,12 +67,16 @@ # remove unused libtool files rm -f $RPM_BUILD_ROOT/%{_libdir}/*a +strip $RPM_BUILD_ROOT/%{_libdir}/*.so* %if %{?tog_pegasus:0}%{!?tog_pegasus:1} rm -f $RPM_BUILD_ROOT/%{_libdir}/cmpi/*a +strip $RPM_BUILD_ROOT/%{_libdir}/cmpi/*.so* %else rm -f $RPM_BUILD_ROOT/opt/tog-pegasus/providers/lib/*a +strip $RPM_BUILD_ROOT/opt/tog-pegasus/providers/lib/*.so* %endif + %post # Register Schema and Provider - this is higly provider specific @@ -99,19 +103,21 @@ %files %defattr(-,root,root) +%docdir %{_datadir}/doc/%{name}-%{version} %{_datadir}/%{name} %{_datadir}/doc/%{name}-%{version} -%{_libdir}/*.so* +%{_libdir}/*.so.* %if %{?tog_pegasus:0}%{!?tog_pegasus:1} -%{_libdir}/cmpi/*.so* +%{_libdir}/cmpi/*.so %else -/opt/tog-pegasus/providers/lib/*.so* +/opt/tog-pegasus/providers/lib/*.so %endif %files devel %defattr(-,root,root) %{_includedir}/* +%{_libdir}/*.so %files test @@ -119,5 +125,5 @@ %{_datadir}/sblim-testsuite %changelog -* Wed Jul 20 2005 Mark Hamzy <ha...@us...> 1.5.2b-1%{?tog_pegasus:.tog-pegasus} +* Wed Jul 20 2005 Mark Hamzy <ha...@us...> %{version}-%{release} - initial support Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/cmpi-base/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile.am 14 Jul 2005 14:27:47 -0000 1.8 +++ Makefile.am 27 Jul 2005 16:01:08 -0000 1.9 @@ -59,6 +59,7 @@ cmpiOSBase_ComputerSystem.c \ OSBase_ComputerSystem.c libcmpiOSBase_ComputerSystemProvider_la_LIBADD = -lcmpiOSBase_Common +libcmpiOSBase_ComputerSystemProvider_la_LDFLAGS = -avoid-version # Operating System libcmpiOSBase_OperatingSystemProvider_la_SOURCES = \ @@ -69,7 +70,7 @@ libcmpiOSBase_OperatingSystemProvider_la_LIBADD = -lcmpiOSBase_Common \ -ldmiinfo @LINDHELP@ # This gcc/ld specific flag is ugly - need to check in configure -libcmpiOSBase_OperatingSystemProvider_la_LDFLAGS = -Wc,-nostartfiles +libcmpiOSBase_OperatingSystemProvider_la_LDFLAGS = -Wc,-nostartfiles -avoid-version # Operating System Statistical Data libcmpiOSBase_OperatingSystemStatisticalDataProvider_la_SOURCES = \ @@ -77,6 +78,7 @@ cmpiOSBase_OperatingSystemStatisticalData.c \ OSBase_OperatingSystemStatisticalData.c libcmpiOSBase_OperatingSystemStatisticalDataProvider_la_LIBADD = -lcmpiOSBase_Common +libcmpiOSBase_OperatingSystemStatisticalDataProvider_la_LDFLAGS = -avoid-version # Unix Process libcmpiOSBase_UnixProcessProvider_la_SOURCES = \ @@ -84,6 +86,7 @@ cmpiOSBase_UnixProcess.c \ OSBase_UnixProcess.c libcmpiOSBase_UnixProcessProvider_la_LIBADD = -lcmpiOSBase_Common +libcmpiOSBase_UnixProcessProvider_la_LDFLAGS = -avoid-version # Processor libcmpiOSBase_ProcessorProvider_la_SOURCES = \ @@ -91,6 +94,7 @@ cmpiOSBase_Processor.c \ OSBase_Processor.c libcmpiOSBase_ProcessorProvider_la_LIBADD = -lcmpiOSBase_Common +libcmpiOSBase_ProcessorProvider_la_LDFLAGS = -avoid-version # Base Board libcmpiOSBase_BaseBoardProvider_la_SOURCES = \ @@ -98,17 +102,27 @@ cmpiOSBase_BaseBoard.c \ OSBase_BaseBoard.c libcmpiOSBase_BaseBoardProvider_la_LIBADD = -lcmpiOSBase_Common -ldmiinfo +libcmpiOSBase_BaseBoardProvider_la_LDFLAGS = -avoid-version libcmpiOSBase_RunningOSProvider_la_SOURCES = cmpiOSBase_RunningOSProvider.c libcmpiOSBase_RunningOSProvider_la_LIBADD = -lcmpiOSBase_Common +libcmpiOSBase_RunningOSProvider_la_LDFLAGS = -avoid-version + libcmpiOSBase_OSProcessProvider_la_SOURCES = cmpiOSBase_OSProcessProvider.c libcmpiOSBase_OSProcessProvider_la_LIBADD = -lcmpiOSBase_Common +libcmpiOSBase_OSProcessProvider_la_LDFLAGS = -avoid-version + libcmpiOSBase_OperatingSystemStatisticsProvider_la_SOURCES = cmpiOSBase_OperatingSystemStatisticsProvider.c libcmpiOSBase_OperatingSystemStatisticsProvider_la_LIBADD = -lcmpiOSBase_Common +libcmpiOSBase_OperatingSystemStatisticsProvider_la_LDFLAGS = -avoid-version + libcmpiOSBase_CSProcessorProvider_la_SOURCES = cmpiOSBase_CSProcessorProvider.c libcmpiOSBase_CSProcessorProvider_la_LIBADD = -lcmpiOSBase_Common +libcmpiOSBase_CSProcessorProvider_la_LDFLAGS = -avoid-version + libcmpiOSBase_CSBaseBoardProvider_la_SOURCES = cmpiOSBase_CSBaseBoardProvider.c libcmpiOSBase_CSBaseBoardProvider_la_LIBADD = -lcmpiOSBase_Common +libcmpiOSBase_CSBaseBoardProvider_la_LDFLAGS = -avoid-version # OSBase support utility libraries |
From: Adrian S. <a3s...@us...> - 2005-07-26 19:24:58
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16048 Modified Files: wbemcat Log Message: fixed debugging adat Index: wbemcat =================================================================== RCS file: /cvsroot/sblim/sfcb/wbemcat,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- wbemcat 26 Jul 2005 19:19:26 -0000 1.7 +++ wbemcat 26 Jul 2005 19:24:48 -0000 1.8 @@ -74,23 +74,22 @@ # Pipe STDOUT to nc command # DEBUG: Comment out this line to see what data gets sent to the CIMOM -# nc not supported on all distributions +# since nc not supported on all distributions it is not used anymore # open(STDOUT, "| nc $host $port") || die "Cannot fork nc command: $!"; -my ($socket, $answer,$n); +my ($socket, $answer); $socket=IO::Socket::INET->new(PeerAddr => $host, PeerPort => $port, Proto => "tcp", Type => SOCK_STREAM) or die "Could not connect to $host:$port : $@\n"; -# Send preamble and XML data to CIMOM via STDOUT pipe +# Send preamble and XML data to CIMOM to $socket print $socket @preamble; print $socket @xml; # Get the answer $answer = ""; while (defined ($answer = <$socket>)) { - print ">$answer<"; + print $answer; } -#print $answer; close($socket); |
From: Adrian S. <a3s...@us...> - 2005-07-26 19:19:35
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14363 Modified Files: wbemcat Log Message: Fixed [ 1242514 ] wbemcat fails under SuSE nc program not needed anymore. Its function is replaced by a few Perl stmts. Index: wbemcat =================================================================== RCS file: /cvsroot/sblim/sfcb/wbemcat,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- wbemcat 7 Jun 2005 20:01:52 -0000 1.6 +++ wbemcat 26 Jul 2005 19:19:26 -0000 1.7 @@ -21,6 +21,7 @@ use strict; use Getopt::Long; +use IO::Socket; # Defaults my $port = 5988; @@ -72,11 +73,24 @@ # Pipe STDOUT to nc command # DEBUG: Comment out this line to see what data gets sent to the CIMOM -open(STDOUT, "| nc $host $port") || die "Cannot fork nc command: $!"; -# Send preamble and XML data to CIMOM via STDOUT pipe -print @preamble; -print @xml; +# nc not supported on all distributions +# open(STDOUT, "| nc $host $port") || die "Cannot fork nc command: $!"; -close(STDOUT) || warn "Cannot close STDOUT"; +my ($socket, $answer,$n); +$socket=IO::Socket::INET->new(PeerAddr => $host, PeerPort => $port, + Proto => "tcp", Type => SOCK_STREAM) + or die "Could not connect to $host:$port : $@\n"; +# Send preamble and XML data to CIMOM via STDOUT pipe +print $socket @preamble; +print $socket @xml; + +# Get the answer +$answer = ""; +while (defined ($answer = <$socket>)) { + print ">$answer<"; +} +#print $answer; + +close($socket); |
From: Viktor M. <mih...@us...> - 2005-07-26 13:51:30
|
Update of /cvsroot/sblim/cmpi-base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30842 Modified Files: configure.ac sblim-cmpi-base.spec.in Log Message: Update spec file for rpmlint compliance. Index: sblim-cmpi-base.spec.in =================================================================== RCS file: /cvsroot/sblim/cmpi-base/sblim-cmpi-base.spec.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- sblim-cmpi-base.spec.in 12 Jul 2005 13:06:55 -0000 1.7 +++ sblim-cmpi-base.spec.in 26 Jul 2005 13:51:07 -0000 1.8 @@ -11,9 +11,10 @@ Summary: Sample CMPI Provider Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ -Release: %{?tog_pegasus:tog_pegasus}%{!?tog_pegasus:1} +Release: 1%{?tog_pegasus:.tog_pegasus} Group: Systems Management/Base -License: Common Public License 1.0 +URL: http://www.sblim.org +License: CPL Source0: http://prdownloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2 @@ -56,26 +57,21 @@ %clean -if [ `id -ur` != 0 ] -then -# paranoia check - rm -rf $RPM_BUILD_ROOT -fi +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %install -if [ `id -ur` != 0 ] -then -# paranoia check - rm -rf $RPM_BUILD_ROOT -fi +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install # remove unused libtool files rm -f $RPM_BUILD_ROOT/%{_libdir}/*a +%if %{?tog_pegasus:0}%{!?tog_pegasus:1} rm -f $RPM_BUILD_ROOT/%{_libdir}/cmpi/*a +%else rm -f $RPM_BUILD_ROOT/opt/tog-pegasus/providers/lib/*a +%endif %post # Register Schema and Provider - this is higly provider specific @@ -98,8 +94,7 @@ %{_datadir}/%{name}/provider-register.sh -d %{?tog_pegasus:-t pegasus} \ -r %{REGISTRATION} -m %{SCHEMA} > /dev/null -%postun -/sbin/ldconfig +%postun -p /sbin/ldconfig %files @@ -116,11 +111,13 @@ %files devel %defattr(-,root,root) -%{_includedir} +%{_includedir}/* %files test %defattr(-,root,root) %{_datadir}/sblim-testsuite - +%changelog +* Wed Jul 20 2005 Mark Hamzy <ha...@us...> 1.5.2b-1%{?tog_pegasus:.tog-pegasus} + - initial support Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/cmpi-base/configure.ac,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- configure.ac 12 Jul 2005 13:06:54 -0000 1.9 +++ configure.ac 26 Jul 2005 13:51:07 -0000 1.10 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(SBLIM BaseOS Providers Base, 1.5.2a, sbl...@li...,sblim-cmpi-base) +AC_INIT(SBLIM BaseOS Providers Base, 1.5.2b, sbl...@li...,sblim-cmpi-base) AC_CONFIG_SRCDIR([OSBase_Common.c]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE |