summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-01-27 10:51:57 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-02-09 08:09:24 +0100
commit2c27ad343d20008d335bde0bce3beda779bd552c (patch)
treeb0a2040e507d86e28732fe9a1c867ef8ddc30edf /solenv
parent68210e1c06f8746101ad765ba646a25c6364ef11 (diff)
native-code.py: When filtering the services.rdb, keep also the factories.
Change-Id: I663e82322a05b7b6f140cb9adecbe1465f320f95
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/native-code.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 8afb2cef1d30..41796fb213b5 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -8,6 +8,7 @@
from __future__ import print_function
from optparse import OptionParser
+import re
import sys
import xml.etree.ElementTree as ET
@@ -195,11 +196,26 @@ def limit_rdb(services_rdb, full_factory_map, full_constructor_map):
root = tree.getroot()
for component in root.findall('{http://openoffice.org/2010/uno-components}component'):
+ # direct
+ uri = component.get('uri')
+ component_name = None
+ if uri != None:
+ component_name = re.sub('^vnd.sun.star.expand:\$LO_LIB_DIR/([^.]*).so$', '\\1.a', uri)
+ if component_name in full_factory_map:
+ continue
+
+ # via a constructor - limit only to those we have
+ has_constructor = False
for implementation in component.findall('{http://openoffice.org/2010/uno-components}implementation'):
constructor = implementation.get('constructor')
- if constructor != None and constructor not in full_constructor_map:
+ if constructor in full_constructor_map:
+ has_constructor = True
+ else:
component.remove(implementation)
+ if not has_constructor:
+ root.remove(component)
+
tree.write(services_rdb[0] + '.out', xml_declaration = True, method = 'xml')