From 7f435a038a68dd053fadd8c87c6cd1591a93ec25ddc7db39663dbfc96e67f9cd Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Tue, 2 Nov 2010 14:10:34 +0000 Subject: [PATCH] resolve conflict OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libxml2?expand=0&rev=26 --- libxml2-python.spec | 2 +- libxml2-xpath-ns-attr-axis.patch | 55 ++++++++++++++++---------------- libxml2.spec | 3 +- 3 files changed, 31 insertions(+), 29 deletions(-) diff --git a/libxml2-python.spec b/libxml2-python.spec index c6c8fce..d2bddf2 100644 --- a/libxml2-python.spec +++ b/libxml2-python.spec @@ -25,7 +25,7 @@ Group: Development/Libraries/Python AutoReqProv: on Summary: Python Bindings for libxml2 Version: 2.7.7 -Release: 7 +Release: 8 Source: libxml2-%{version}.tar.bz2 Source1: libxml2-python-rpmlintrc %py_requires diff --git a/libxml2-xpath-ns-attr-axis.patch b/libxml2-xpath-ns-attr-axis.patch index e23a723..0bbf06e 100644 --- a/libxml2-xpath-ns-attr-axis.patch +++ b/libxml2-xpath-ns-attr-axis.patch @@ -6,54 +6,55 @@ Subject: [PATCH] Fix the semantic of XPath axis for namespace/attribute context The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification --- - xpath.c | 20 ++++++++++++++++---- - 1 files changed, 16 insertions(+), 4 deletions(-) + xpath.c | 23 ++++++++++++++++++----- + 1 file changed, 18 insertions(+), 5 deletions(-) Index: libxml2-2.7.7/xpath.c =================================================================== --- libxml2-2.7.7.orig/xpath.c +++ libxml2-2.7.7/xpath.c -@@ -8106,8 +8106,16 @@ xmlXPathNextPrecedingSibling(xmlXPathPar +@@ -8106,9 +8106,17 @@ xmlXPathNextPrecedingSibling(xmlXPathPar xmlNodePtr xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL); - if (cur != NULL && cur->children != NULL) -+ if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) || -+ (ctxt->context->node->type == XML_NAMESPACE_DECL)) -+ return(NULL); -+ if (cur != NULL) { -+ if ((cur->type == XML_ATTRIBUTE_NODE) || -+ (cur->type == XML_NAMESPACE_DECL)) +- return cur->children ; +- if (cur == NULL) cur = ctxt->context->node; ++ if ((cur != NULL) && (cur->type != XML_ATTRIBUTE_NODE) && ++ (cur->type != XML_NAMESPACE_DECL) && (cur->children != NULL)) ++ return(cur->children); ++ ++ if (cur == NULL) { ++ cur = ctxt->context->node; ++ if (cur->type == XML_NAMESPACE_DECL) + return(NULL); -+ if (cur->children != NULL) - return cur->children ; ++ if (cur->type == XML_ATTRIBUTE_NODE) ++ cur = cur->parent; + } - if (cur == NULL) cur = ctxt->context->node; if (cur == NULL) return(NULL) ; /* ERROR */ if (cur->next != NULL) return(cur->next) ; -@@ -8162,6 +8170,9 @@ xmlNodePtr + do { +@@ -8162,8 +8170,13 @@ xmlNodePtr xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL); -+ if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) || -+ (ctxt->context->node->type == XML_NAMESPACE_DECL)) -+ return(NULL); - if (cur == NULL) +- if (cur == NULL) ++ if (cur == NULL) { cur = ctxt->context->node; ++ if (cur->type == XML_NAMESPACE_DECL) ++ return(NULL); ++ if (cur->type == XML_ATTRIBUTE_NODE) ++ return(cur->parent); ++ } if (cur == NULL) -@@ -8203,12 +8214,13 @@ xmlXPathNextPrecedingInternal(xmlXPathPa - xmlNodePtr cur) - { - if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL); -+ if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) || -+ (ctxt->context->node->type == XML_NAMESPACE_DECL)) -+ return(NULL); - if (cur == NULL) { - cur = ctxt->context->node; + return (NULL); + if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE)) +@@ -8208,7 +8221,7 @@ xmlXPathNextPrecedingInternal(xmlXPathPa if (cur == NULL) return (NULL); -- if (cur->type == XML_NAMESPACE_DECL) + if (cur->type == XML_NAMESPACE_DECL) - cur = (xmlNodePtr)((xmlNsPtr)cur)->next; ++ return (NULL); ctxt->ancestor = cur->parent; } if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE)) diff --git a/libxml2.spec b/libxml2.spec index b631e02..6f1d314 100644 --- a/libxml2.spec +++ b/libxml2.spec @@ -25,7 +25,7 @@ Group: System/Libraries Summary: A Library to Manipulate XML Files Url: http://xmlsoft.org Version: 2.7.7 -Release: 7 +Release: 8 Source: %{name}-%{version}.tar.bz2 Source2: baselibs.conf Patch1: noxref.patch @@ -103,6 +103,7 @@ progress. %setup -q %patch1 -p1 %patch2 -p1 + %build %configure --disable-static \ --with-html-subdir=packages/%{name}/html \