rpms/apr-util/devel apr-util-1.2.8-xmlns.patch, NONE, 1.1 apr-util.spec, 1.36, 1.37

Joe Orton (jorton) fedora-extras-commits at redhat.com
Tue Jul 3 10:16:55 UTC 2007


Author: jorton

Update of /cvs/extras/rpms/apr-util/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11049

Modified Files:
	apr-util.spec 
Added Files:
	apr-util-1.2.8-xmlns.patch 
Log Message:
* Tue Jul  3 2007 Joe Orton <jorton at redhat.com> 1.2.8-8
- add fix for attribute namespace handling in apr_xml (PR 41908)


apr-util-1.2.8-xmlns.patch:

--- NEW FILE apr-util-1.2.8-xmlns.patch ---

Author: jorton
Date: Mon Mar 26 14:19:44 2007
New Revision: 522630

URL: http://svn.apache.org/viewvc?view=rev&rev=522630
Log:
* xml/apr_xml.c (elem_size, write_elem): Fix attribute namespace
handling; where applicable, use the mapped namespace index.

PR: 41908

--- apr-util-1.2.8/xml/apr_xml.c.xmlns
+++ apr-util-1.2.8/xml/apr_xml.c
@@ -666,7 +666,8 @@
 	    }
 	    else {
 		/* compute size of: ' ns%d:%s="%s"' */
-		size += 3 + APR_XML_NS_LEN(attr->ns) + 1 + strlen(attr->name) + 2 + strlen(attr->value) + 1;
+                int ns = ns_map ? ns_map[attr->ns] : attr->ns;
+                size += 3 + APR_XML_NS_LEN(ns) + 1 + strlen(attr->name) + 2 + strlen(attr->value) + 1;
 	    }
 	}
 
@@ -736,8 +737,10 @@
 	for (attr = elem->attr; attr; attr = attr->next) {
 	    if (attr->ns == APR_XML_NS_NONE)
 		len = sprintf(s, " %s=\"%s\"", attr->name, attr->value);
-	    else
-		len = sprintf(s, " ns%d:%s=\"%s\"", attr->ns, attr->name, attr->value);
+            else {
+                ns = ns_map ? ns_map[attr->ns] : attr->ns;
+                len = sprintf(s, " ns%d:%s=\"%s\"", ns, attr->name, attr->value);
+            }
 	    s += len;
 	}
 


Index: apr-util.spec
===================================================================
RCS file: /cvs/extras/rpms/apr-util/devel/apr-util.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- apr-util.spec	5 Apr 2007 16:10:00 -0000	1.36
+++ apr-util.spec	3 Jul 2007 10:16:20 -0000	1.37
@@ -4,7 +4,7 @@
 Summary: Apache Portable Runtime Utility library
 Name: apr-util
 Version: 1.2.8
-Release: 7
+Release: 8
 License: Apache Software License 2.0
 Group: System Environment/Libraries
 URL: http://apr.apache.org/
@@ -13,6 +13,7 @@
 Patch0: apr-util-1.2.2-exports.patch
 Patch2: apr-util-1.2.7-pkgconf.patch
 Patch3: apr-util-1.2.8-dbddso.patch
+Patch4: apr-util-1.2.8-xmlns.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 BuildRequires: autoconf, apr-devel >= 1.2.0
 BuildRequires: openldap-devel, db4-devel, expat-devel
@@ -61,6 +62,7 @@
 %patch0 -p1 -b .exports
 %patch2 -p1 -b .pkgconf
 %patch3 -p1 -b .dbddso
+%patch4 -p1 -b .xmlns
 cp $RPM_SOURCE_DIR/apr_dbd_mysql.c dbd
 
 %build
@@ -136,6 +138,9 @@
 %{_libdir}/pkgconfig/*.pc
 
 %changelog
+* Tue Jul  3 2007 Joe Orton <jorton at redhat.com> 1.2.8-8
+- add fix for attribute namespace handling in apr_xml (PR 41908)
+
 * Thu Apr  5 2007 Joe Orton <jorton at redhat.com> 1.2.8-7
 - remove old Conflicts, doxygen BR (#225254)
 




More information about the scm-commits mailing list