Hello community,
here is the log from the commit of package beagle
checked in at Tue Jul 8 16:23:27 CEST 2008.
--------
--- GNOME/beagle/beagle.changes 2008-06-27 22:50:13.000000000 +0200
+++ beagle/beagle.changes 2008-07-01 07:36:13.401735000 +0200
@@ -1,0 +2,8 @@
+Tue Jul 1 07:38:15 CEST 2008 - pwu@suse.de
+
+- Add beagle-urifu-add-number-sign-unescaped.patch and
+ beagle-add-number-sign.patch from upstream:
+ http://bugzilla.gnome.org/show_bug.cgi?id=535020.
+ Avoid to escape '#' in uri to %23 (bnc #372186).
+
+-------------------------------------------------------------------
New:
----
beagle-add-number-sign.patch
beagle-urifu-add-number-sign-unescaped.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ beagle.spec ++++++
--- /var/tmp/diff_new_pack.Do6976/_old 2008-07-08 16:19:28.000000000 +0200
+++ /var/tmp/diff_new_pack.Do6976/_new 2008-07-08 16:19:28.000000000 +0200
@@ -19,7 +19,7 @@
Group: Productivity/Other
AutoReqProv: on
Version: 0.3.7
-Release: 26
+Release: 30
Summary: Desktop Search Application
Url: http://beagle-project.org
Source: %{name}-%{version}.tar.bz2
@@ -38,6 +38,9 @@
Patch11: beagle-firefox-error.patch
# PATCH-FIX-UPSTREAM beagle-new-camel-bindings.patch maw@novell.com -- See http://mail.gnome.org/archives/svn-commits-list/2008-April/msg06080.html; this will go away in a future release
Patch12: beagle-new-camel-bindings.patch
+# PATCH-FIX-UPSTREAM beagle-urifu-add-number-sign-unescaped.patch and beagle-add-number-sign.patch pwu@novell.com -- see http://bugzilla.gnome.org/show_bug.cgi?id=535020
+Patch13: beagle-urifu-add-number-sign-unescaped.patch
+Patch14: beagle-add-number-sign.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: /usr/sbin/groupadd /usr/sbin/useradd /bin/rm
Requires: mono-core >= 1.1.13.5
@@ -424,6 +427,8 @@
%patch10
%patch11
%patch12
+%patch13 -p1
+%patch14 -p1
%build
intltoolize --copy --force --automake
@@ -588,6 +593,11 @@
%{prefix}/lib/monodoc/sources/beagle-docs.*
%changelog
+* Tue Jul 01 2008 pwu@suse.de
+- Add beagle-urifu-add-number-sign-unescaped.patch and
+ beagle-add-number-sign.patch from upstream:
+ http://bugzilla.gnome.org/show_bug.cgi?id=535020.
+ Avoid to escape '#' in uri to %%23 (bnc #372186).
* Sat Jun 28 2008 maw@suse.de
- Add beagle-new-camel-bindings.patch to deal with changes
in evolution-sharp's API.
++++++ beagle-add-number-sign.patch ++++++
Index: beagle-0.3.7/beagled/IndexHelper/IndexHelper.cs
===================================================================
--- beagle-0.3.7.orig/beagled/IndexHelper/IndexHelper.cs
+++ beagle-0.3.7/beagled/IndexHelper/IndexHelper.cs
@@ -160,12 +160,14 @@ namespace Beagle.IndexHelper {
// Whether we should generate heap-shot snapshots
heap_shot = (Environment.GetEnvironmentVariable ("_HEY_LETS_DO_A_HEAP_SHOT") != null);
- // Start the monitor thread, which keeps an eye on memory usage and idle time.
- ExceptionHandlingThread.Start (new ThreadStart (MemoryAndIdleMonitorWorker));
+ if (! run_by_hand) {
+ // Start the monitor thread, which keeps an eye on memory usage and idle time.
+ ExceptionHandlingThread.Start (new ThreadStart (MemoryAndIdleMonitorWorker));
- // Start a thread that watches the daemon and begins a shutdown
- // if it terminates.
- ExceptionHandlingThread.Start (new ThreadStart (DaemonMonitorWorker));
+ // Start a thread that watches the daemon and begins a shutdown
+ // if it terminates.
+ ExceptionHandlingThread.Start (new ThreadStart (DaemonMonitorWorker));
+ }
// Start the main loop
main_loop.Run ();
Index: beagle-0.3.7/beagled/IndexHelper/RemoteIndexerExecutor.cs
===================================================================
--- beagle-0.3.7.orig/beagled/IndexHelper/RemoteIndexerExecutor.cs
+++ beagle-0.3.7/beagled/IndexHelper/RemoteIndexerExecutor.cs
@@ -43,8 +43,6 @@ namespace Beagle.IndexHelper {
static public int Count = 0;
static Hashtable indexer_table = new Hashtable ();
- Indexable[] child_indexables;
-
public override ResponseMessage Execute (RequestMessage raw_request)
{
RemoteIndexerRequest remote_request = (RemoteIndexerRequest) raw_request;
Index: beagle-0.3.7/Filters/FilterDocbook.cs
===================================================================
--- beagle-0.3.7.orig/Filters/FilterDocbook.cs
+++ beagle-0.3.7/Filters/FilterDocbook.cs
@@ -58,7 +58,7 @@ namespace Beagle.Filters
public FilterDocbook ()
{
SnippetMode = false;
- SetVersion (4);
+ SetVersion (5);
SetFileType ("documentation");
}
@@ -159,7 +159,8 @@ namespace Beagle.Filters
if (entries_stack.Count > 0)
parent_entry = (DocbookEntry) entries_stack.Peek ();
- Indexable indexable = new Indexable (UriFu.PathToFileUri (String.Format ("{0}#{1}", base_path, entry.Id)));
+ Indexable indexable;
+ indexable = new Indexable (UriFu.AddFragment (Indexable.Uri, entry.Id, false));
indexable.HitType = "DocbookEntry";
indexable.MimeType = "text/x-docbook-entry";
indexable.Filtering = IndexableFiltering.AlreadyFiltered;
Index: beagle-0.3.7/Filters/FilterArchive.cs
===================================================================
--- beagle-0.3.7.orig/Filters/FilterArchive.cs
+++ beagle-0.3.7/Filters/FilterArchive.cs
@@ -164,15 +164,10 @@ namespace Beagle.Filters {
++count;
total_size += a_entry.Size;
- // FIXME: For nested archives, create uid:foo#bar
- // instead of uid:foo#xxx#bar (avoid duplicates ?)
- // FIXME: Construct correct Uri
- // 1. Use Uri (foo, true): foo is not escaped. This creates serialization error for uris containing non-ascii character
- // 2: Using Uri (foo): foo is escaped. This causes foo.zip#b#c (file c in archive b in archive foo) to be escaped to foo.zip#b%23c. This should be properly escaped back. Note that, file b#c in archive foo.zip would also be escaped to foo.zip#b%23c. If there is any problem about incorrect filename containing '#' in an archive, then System.Uri should be abandoned and a custom Beagle.Uri should be created which can handle multiple fragments.
- // If you read the Uri related FIXMEs and hacks in beagled/*Queryable,
- // then you would see why creating Beagle.Uri class over System.Uri
- // is not at all a bad idea :)
- child = new Indexable (new Uri (Indexable.Uri.ToString () + "#" + a_entry.Name));
+ // Add "#<escaped-path-to-entry>" to the end of the Indexable Uri
+ // So, file b#c in archive foo.zip becomes file:///foo.zip#b%23c
+ // And file c in archive b in archive foo.zip becomes file:///foo.zip#b#c
+ child = new Indexable (UriFu.AddFragment (Indexable.Uri, a_entry.Name, false));
child.CacheContent = true;
child.MimeType = a_entry.MimeType;
Index: beagle-0.3.7/Filters/FilterMonodoc.cs
===================================================================
--- beagle-0.3.7.orig/Filters/FilterMonodoc.cs
+++ beagle-0.3.7/Filters/FilterMonodoc.cs
@@ -100,7 +100,7 @@ namespace Beagle.Filters {
if (type == null)
continue;
- Indexable type_indexable = TypeNodeToIndexable (type, FileInfo);
+ Indexable type_indexable = TypeNodeToIndexable (type, Indexable.Uri);
type_indexable.SetChildOf (this.Indexable);
type_indexable.StoreStream ();
type_indexable.CloseStreams ();
@@ -108,7 +108,7 @@ namespace Beagle.Filters {
foreach(XmlNode member in type.SelectNodes ("Members/Member")) {
Indexable member_indexable = MemberNodeToIndexable (member,
- FileInfo,
+ Indexable.Uri,
type.Attributes ["FullName"].Value);
member_indexable.SetChildOf (this.Indexable);
member_indexable.StoreStream ();
@@ -120,9 +120,10 @@ namespace Beagle.Filters {
Finished ();
}
- static private Indexable TypeNodeToIndexable (XmlNode node, FileInfo file)
+ static private Indexable TypeNodeToIndexable (XmlNode node, Uri base_uri)
{
- Indexable indexable = new Indexable (UriFu.PathToFileUri (file + "#T:" + node.Attributes ["FullName"].Value));
+ string fragment = "T:" + node.Attributes ["FullName"].Value;
+ Indexable indexable = new Indexable (UriFu.AddFragment (base_uri, fragment, false));
indexable.MimeType = "text/html";
indexable.HitType = "MonodocEntry";
@@ -137,7 +138,7 @@ namespace Beagle.Filters {
return indexable;
}
- static private Indexable MemberNodeToIndexable(XmlNode node, FileInfo file, string parentName)
+ static private Indexable MemberNodeToIndexable(XmlNode node, Uri base_uri, string parentName)
{
char memberType = MemberTypeToChar (node.SelectSingleNode ("MemberType").InnerText);
StringBuilder memberFullName = new StringBuilder ();
@@ -159,7 +160,7 @@ namespace Beagle.Filters {
memberFullName.Append (")");
}
- Indexable indexable = new Indexable (UriFu.PathToFileUri (file + "#" + memberFullName));
+ Indexable indexable = new Indexable (UriFu.AddFragment (base_uri, memberFullName.ToString (), false));
indexable.MimeType = "text/html";
indexable.HitType = "MonodocEntry";
Index: beagle-0.3.7/Filters/FilterMail.cs
===================================================================
--- beagle-0.3.7.orig/Filters/FilterMail.cs
+++ beagle-0.3.7/Filters/FilterMail.cs
@@ -423,8 +423,9 @@ namespace Beagle.Filters {
// attachments along with (real) attachments.
if (Array.IndexOf (blacklisted_mime_types, mime_type) == -1) {
- string sub_uri = this.indexable.Uri.ToString () + "#" + this.count;
- Indexable child = new Indexable (new Uri (sub_uri));
+ string sub_uri = "#" + this.count;
+ Indexable child;
+ child = new Indexable (UriFu.AddFragment (this.indexable.Uri, sub_uri, true));
child.DisplayUri = new Uri (this.indexable.DisplayUri.ToString () + "#" + this.count);
Index: beagle-0.3.7/beagled/FileSystemQueryable/FileSystemQueryable.cs
===================================================================
--- beagle-0.3.7.orig/beagled/FileSystemQueryable/FileSystemQueryable.cs
+++ beagle-0.3.7/beagled/FileSystemQueryable/FileSystemQueryable.cs
@@ -1744,7 +1744,8 @@ namespace Beagle.Daemon.FileSystemQuerya
string is_child = hit [Property.IsChildPropKey];
string fragment = null;
if (is_child == "true") {
- hit.Uri = UriFu.PathToFileUri (path, old_uri.Fragment);
+ Uri uri = UriFu.PathToFileUri (path);
+ hit.Uri = UriFu.AddFragment (uri, old_uri.Fragment, true);
hit.ParentUri = UriFu.PathToFileUri (path);
}
Index: beagle-0.3.7/beagled/DumpIndex.cs
===================================================================
--- beagle-0.3.7.orig/beagled/DumpIndex.cs
+++ beagle-0.3.7/beagled/DumpIndex.cs
@@ -117,7 +117,9 @@ class DumpIndexTool {
internal_uri = UriFu.UriToEscapedString (hit.ParentUri);
hit.ParentUri = UriFu.PathToFileUri (path);
- hit.Uri = UriFu.PathToFileUri (path, hit.Uri.Fragment);
+ hit.Uri = UriFu.AddFragment (UriFu.PathToFileUri (path),
+ hit.Uri.Fragment,
+ true);
} else {
internal_uri = UriFu.UriToEscapedString (hit.Uri);
++++++ beagle-urifu-add-number-sign-unescaped.patch ++++++
Index: beagle/Util/UriFu.cs
===================================================================
--- beagle/Util/UriFu.cs (revision 4776)
+++ beagle/Util/UriFu.cs (revision 4777)
@@ -1,6 +1,7 @@
//
// UriFu.cs
//
+// Copyright (C) 2008 D Bera