rpms/ovaldi/EL-5 ovaldi-5.3-epoch.patch, 1.1, 1.2 ovaldi.spec, 1.2, 1.3

Lubomir Kundrak (lkundrak) fedora-extras-commits at redhat.com
Thu Jan 24 16:56:58 UTC 2008


Author: lkundrak

Update of /cvs/pkgs/rpms/ovaldi/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15937/EL-5

Modified Files:
	ovaldi-5.3-epoch.patch ovaldi.spec 
Log Message:
Fixe the epoch patch


ovaldi-5.3-epoch.patch:

Index: ovaldi-5.3-epoch.patch
===================================================================
RCS file: /cvs/pkgs/rpms/ovaldi/EL-5/ovaldi-5.3-epoch.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ovaldi-5.3-epoch.patch	24 Jan 2008 16:44:42 -0000	1.1
+++ ovaldi-5.3-epoch.patch	24 Jan 2008 16:56:20 -0000	1.2
@@ -1,5 +1,36 @@
---- ./Interpreters.orig/src/EntityComparator.cpp	2008-01-24 17:39:58.000000000 +0100
-+++ ./Interpreters/src/EntityComparator.cpp	2008-01-24 17:40:21.000000000 +0100
+From Mark J. Cox:
+
+Whilst testing regexps today I noticed that ovaldi was not handling epochs 
+correctly.  I had a RPM installed on my system with envr 0:0.8.7-3.el5
+and a state <evr datatype="evr_string" operation="less 
+than">1:0.8.7-4.el5</evr>
+
+Now the installed rpm is less_than 1:0.8.7-4.el5 but wasn't being 
+correctly reported.  So I looked at the ENVR test and found a few issues:
+
+EntityComparator.cpp:
+OvalEnum::ResultEnumeration EntityComparator::CompareEvrString
+...
+                 int installedEpochInt = atoi(defEpochStr.c_str());
+                 int defEpochInt = atoi(installedEpochStr.c_str());
+
+                 if(installedEpochInt > 0) {
+                         sense = 1;
+                 } else if(defEpochInt > 0) {
+                         sense = -1;
+                 }
+..
+
+First, the conversion to integers is confusing, the variable
+names have been transposed.  Second it bases a decision on
+if the epochs are greater than 0, but it's quite possible to have
+any integer epoch (so 9:0.8.7-4.el5 < 42:0.8.7-4.el5 ) etc.
+
+Patch attached.
+
+diff -urp Interpreters.orig/src/EntityComparator.cpp Interpreters/src/EntityComparator.cpp
+--- Interpreters.orig/src/EntityComparator.cpp	2008-01-24 17:52:18.000000000 +0100
++++ Interpreters/src/EntityComparator.cpp	2008-01-24 17:52:41.000000000 +0100
 @@ -114,19 +114,16 @@ OvalEnum::ResultEnumeration EntityCompar
  
  	int sense = 1; // default to later


Index: ovaldi.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ovaldi/EL-5/ovaldi.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ovaldi.spec	24 Jan 2008 16:44:42 -0000	1.2
+++ ovaldi.spec	24 Jan 2008 16:56:20 -0000	1.3
@@ -1,6 +1,6 @@
 Name:           ovaldi
 Version:        5.3
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Reference implementation of the OVAL interpreter
 
 Group:          Applications/System
@@ -61,6 +61,9 @@
 
 
 %changelog
+* Thu Jan 24 2008 Lubomir Kundrak <lkundrak at redhat.com> 5.3-5
+- Make the patch actually apply
+
 * Thu Jan 24 2008 Lubomir Kundrak <lkundrak at redhat.com> 5.3-4
 - Fix handling of epochs
 




More information about the fedora-extras-commits mailing list