summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeather Cynede <cynede@gentoo.org>2015-12-28 11:56:08 +0400
committerHeather Cynede <cynede@gentoo.org>2015-12-28 11:56:49 +0400
commitbc6bb6ffcb35cc40990250d1f5d1888803ca2172 (patch)
tree745f68d4165bff262a41f074d4680295d0564d94 /dev-lang/mono/files
parentdev-libs/liblinear: Stable for PPC64 (bug #569730). (diff)
downloadgentoo-bc6bb6ffcb35cc40990250d1f5d1888803ca2172.tar.gz
gentoo-bc6bb6ffcb35cc40990250d1f5d1888803ca2172.tar.bz2
gentoo-bc6bb6ffcb35cc40990250d1f5d1888803ca2172.zip
dev-lang/mono: mono 4.2.2.10 patch corrections
Package-Manager: portage-2.2.26
Diffstat (limited to 'dev-lang/mono/files')
-rw-r--r--dev-lang/mono/files/fix-for-GitExtensions-issue-2710-another-resolution.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/dev-lang/mono/files/fix-for-GitExtensions-issue-2710-another-resolution.patch b/dev-lang/mono/files/fix-for-GitExtensions-issue-2710-another-resolution.patch
new file mode 100644
index 000000000000..b306b697c09d
--- /dev/null
+++ b/dev-lang/mono/files/fix-for-GitExtensions-issue-2710-another-resolution.patch
@@ -0,0 +1,48 @@
+diff --git a/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs b/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
+index 4b69010..1bb6195 100644
+--- a/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
++++ b/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
+@@ -578,6 +578,34 @@ namespace System.Configuration
+ private ExeConfigurationFileMap exeMapPrev = null;
+ private SettingsPropertyValueCollection values = null;
+
++ /// <remarks>
++ /// Hack to remove the XmlDeclaration that the XmlSerializer adds.
++ /// <br />
++ /// see <a href="https://github.com/mono/mono/pull/2273">Issue 2273</a> for details
++ /// </remarks>
++ private string StripXmlHeader(string serializedValue)
++ {
++ if (serializedValue == null)
++ {
++ return string.Empty;
++ }
++
++ XmlDocument doc = new XmlDocument();
++ XmlElement valueXml = doc.CreateElement("value");
++ valueXml.InnerXml = serializedValue;
++
++ foreach (XmlNode child in valueXml.ChildNodes) {
++ if (child.NodeType == XmlNodeType.XmlDeclaration) {
++ valueXml.RemoveChild(child);
++ break;
++ }
++ }
++
++ // InnerXml will give you well-formed XML that you could save as a separate document, and
++ // InnerText will immediately give you a pure-text representation of this inner XML.
++ return valueXml.InnerXml;
++ }
++
+ private void SaveProperties (ExeConfigurationFileMap exeMap, SettingsPropertyValueCollection collection, ConfigurationUserLevel level, SettingsContext context, bool checkUserLevel)
+ {
+ Configuration config = ConfigurationManager.OpenMappedExeConfiguration (exeMap, level);
+@@ -623,7 +651,7 @@ namespace System.Configuration
+ element.Value.ValueXml = new XmlDocument ().CreateElement ("value");
+ switch (value.Property.SerializeAs) {
+ case SettingsSerializeAs.Xml:
+- element.Value.ValueXml.InnerXml = (value.SerializedValue as string) ?? string.Empty;
++ element.Value.ValueXml.InnerXml = StripXmlHeader(value.SerializedValue as string);
+ break;
+ case SettingsSerializeAs.String:
+ element.Value.ValueXml.InnerText = value.SerializedValue as string;