[Zeitgeist] [Bug 760111] Re: zeitgeist-daemon crashed with OSError in makedirs(): [Errno 13] Permission denied: '/home/ubuntu/.local/share/zeitgeist'

2012-01-25 Thread Siegfried Gevatter
** Branch linked: lp:~zeitgeist/zeitgeist/dbfails

** Changed in: zeitgeist
   Status: Triaged = Fix Committed

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/760111

Title:
  zeitgeist-daemon crashed with OSError in makedirs(): [Errno 13]
  Permission denied: '/home/ubuntu/.local/share/zeitgeist'

Status in Zeitgeist Framework:
  Fix Committed
Status in “zeitgeist” package in Ubuntu:
  Invalid
Status in “zeitgeist” source package in Natty:
  Won't Fix
Status in “zeitgeist” source package in Oneiric:
  Triaged
Status in “zeitgeist” source package in Precise:
  Invalid

Bug description:
  Binary package hint: zeitgeist

  This error is shown when attempting to perform the screen-reader
  installation using the Natty Narwhal Beta 2 candidate, ubuntu-
  desktop-i386.iso, dated 2011-04-13.

  1. start the computer with the cd in the drive
  2. hit any key to bring up the cd menu, right after the bios check
  3. hit enter on language
  4. hit F5
  5. down arrow three times
  6. enter two times
  7. When the live desktop starts, orca will start
  8. wait for the error to appear

  ProblemType: Crash
  DistroRelease: Ubuntu 11.04
  Package: zeitgeist-core 0.7.1-1
  ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
  Uname: Linux 2.6.38-8-generic i686
  Architecture: i386
  Date: Wed Apr 13 18:42:35 2011
  ExecutablePath: /usr/bin/zeitgeist-daemon
  InterpreterPath: /usr/bin/python2.7
  LiveMediaBuild: Ubuntu 11.04 Natty Narwhal - Beta i386 (20110413)
  PackageArchitecture: all
  ProcCmdline: /usr/bin/python /usr/bin/zeitgeist-daemon
  ProcEnviron:
   SHELL=/bin/bash
   LANGUAGE=en_US:en
   LANG=en_US.UTF-8
  PythonArgs: ['/usr/bin/zeitgeist-daemon']
  SourcePackage: zeitgeist
  Title: zeitgeist-daemon crashed with OSError in makedirs(): [Errno 13] 
Permission denied: '/home/ubuntu/.local/share/zeitgeist'
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/760111/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 921840] [NEW] Clean up Python FTS suport files

2012-01-25 Thread Siegfried Gevatter
Public bug reported:

Don't ship another copy of datamodel.py but use the one from the Python
module (python/datamodel.py vs extensions/fts-python/datamodel.py).

Also, go through the remaining files (constants.py and sql.py) and
remove all unused stuff or otherwise clean it up.

** Affects: zeitgeist
 Importance: Medium
 Status: Confirmed

** Changed in: zeitgeist
   Importance: Undecided = Medium

** Changed in: zeitgeist
   Status: New = Confirmed

** Changed in: zeitgeist
Milestone: None = 0.9.0

** Summary changed:

- Clean up Python FTS
+ Clean up Python FTS suport files

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/921840

Title:
  Clean up Python FTS suport files

Status in Zeitgeist Framework:
  Confirmed

Bug description:
  Don't ship another copy of datamodel.py but use the one from the
  Python module (python/datamodel.py vs extensions/fts-
  python/datamodel.py).

  Also, go through the remaining files (constants.py and sql.py) and
  remove all unused stuff or otherwise clean it up.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/921840/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 772265] Re: The datahub starts zeitgeist-daemon on startup

2012-01-27 Thread Siegfried Gevatter
Is this still an issue now that Zeitgeist has been ported to Vala?

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/772265

Title:
  The datahub starts zeitgeist-daemon on startup

Status in Zeitgeist Client Library:
  New
Status in Zeitgeist Framework:
  Invalid
Status in Zeitgeist Datahub:
  New

Bug description:
  We have been advising distros put zeitgeist-datahub into the autostart
  section for the sessions. This is better in theory because this way we
  only start a native daemon on login and can defer the launching of the
  heavier Python process zeitgeist-daemon.

  Unfortunately zeitgeist-datahub does DBus activation of the zeitgeist-
  daemon on startup so we really don't get the benefits we wanted.
  Bootcharts from Ubuntu 11.04 indicates that ZG eats about 1s on the
  login time and I don't think that is acceptable for ZG in the longer
  run. That is - no catastrophe for 11.04, but we should fix this.

  (a related issue seems to be that the dbus activated zeitgeist-daemon
  seems to launch another datahub instance that then immediately becomes
  a zombie... ? :-/)

To manage notifications about this bug go to:
https://bugs.launchpad.net/libzeitgeist/+bug/772265/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 618639] Re: Logs 3 events for each recent file

2012-01-27 Thread Siegfried Gevatter
 if (added == visited == modified)
This would probably fail after deleting recently-used.xbel :(

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/618639

Title:
  Logs 3 events for each recent file

Status in Zeitgeist Framework:
  Opinion
Status in Zeitgeist Datahub:
  Confirmed

Bug description:
  Each event for a recent file is logged 3 times. An AccessEvent,
  ModifyEvent, and a CreateEvent. Scatter shooting when we can't figure
  out the event type greatly decreases the value of the logged data.

  We need to figure something out here I think...

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/618639/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 922620] [NEW] Fix failing test cases: testBlacklistSignals and testDataSourceSignals

2012-01-27 Thread Siegfried Gevatter
Public bug reported:

What the title says.

** Affects: zeitgeist
 Importance: Low
 Status: Triaged

** Changed in: zeitgeist
   Importance: Undecided = Low

** Changed in: zeitgeist
   Status: New = Triaged

** Changed in: zeitgeist
Milestone: None = 0.9.0

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/922620

Title:
  Fix failing test cases: testBlacklistSignals and testDataSourceSignals

Status in Zeitgeist Framework:
  Triaged

Bug description:
  What the title says.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/922620/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 903975] Re: gedit crashed with SIGSEGV in zeitgeist_log_insert_events_from_ptrarray()

2012-01-30 Thread Siegfried Gevatter
So ZeitgeistLog was being free'd once a tab was closed (but then still used for 
any other tabs). Fixed it here:
http://git.gnome.org/browse/gedit/commit/?id=4d7222562430379055e323f561c197dcb4106477

Not sure if that's the cause of this bug, but I couldn't spot anything
else.

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Data-Sources.
https://bugs.launchpad.net/bugs/903975

Title:
  gedit crashed with SIGSEGV in
  zeitgeist_log_insert_events_from_ptrarray()

Status in Zeitgeist Data-Sources:
  Invalid
Status in “libzeitgeist” package in Ubuntu:
  Confirmed

Bug description:
  IDK if it helps or is related but when the problem happened I had an
  FTP connection to a remote webserver open in Nautilus and had a php
  file open.

  ProblemType: Crash
  DistroRelease: Ubuntu 12.04
  Package: gedit 3.2.5-0ubuntu1
  ProcVersionSignature: Ubuntu 3.2.0-4.10-generic 3.2.0-rc5
  Uname: Linux 3.2.0-4-generic x86_64
  ApportVersion: 1.90-0ubuntu1
  Architecture: amd64
  Date: Tue Dec 13 17:17:00 2011
  ExecutablePath: /usr/bin/gedit
  InstallationMedia: Ubuntu 12.04 LTS Precise Pangolin - Alpha amd64 
(20111212)
  ProcCmdline: gedit /home/User Name/.gvfs/FTP\ as\ removed\ on\ 
ftp.removed.com/www/removed/removed/removed/removed/removed.php
  SegvAnalysis:
   Segfault happened at: 0x7f1c7d48f0de 
zeitgeist_log_insert_events_from_ptrarray+62: cmp%rax,(%rdx)
   PC (0x7f1c7d48f0de) ok
   source %rax ok
   destination (%rdx) (0x0001) not located in a known VMA region (needed 
writable region)!
  SegvReason: writing NULL VMA
  Signal: 11
  SourcePackage: gedit
  StacktraceTop:
   zeitgeist_log_insert_events_from_ptrarray () from 
/usr/lib/libzeitgeist-1.0.so.1
   zeitgeist_log_insert_events_no_reply () from /usr/lib/libzeitgeist-1.0.so.1
   ?? () from /usr/lib/gedit/plugins/libzeitgeistplugin.so
   g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
   ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  Title: gedit crashed with SIGSEGV in 
zeitgeist_log_insert_events_from_ptrarray()
  UpgradeStatus: Upgraded to precise on 2011-12-13 (0 days ago)
  UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist-datasources/+bug/903975/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~rainct/zeitgeist/monitor-queue into lp:zeitgeist

2012-01-30 Thread Siegfried Gevatter
Siegfried Gevatter has proposed merging lp:~rainct/zeitgeist/monitor-queue into 
lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)

For more details, see:
https://code.launchpad.net/~rainct/zeitgeist/monitor-queue/+merge/90720
-- 
https://code.launchpad.net/~rainct/zeitgeist/monitor-queue/+merge/90720
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~rainct/zeitgeist/monitor-queue into lp:zeitgeist.
=== modified file 'src/notify.vala'
--- src/notify.vala	2011-10-20 14:20:17 +
+++ src/notify.vala	2012-01-30 15:48:24 +
@@ -32,7 +32,7 @@
 construct
 {
 monitors = new HashTablestring, Monitor (str_hash, str_equal);
-connections = new HashTablestring, GenericArraystring 
+connections = new HashTablestring, GenericArraystring
 (str_hash, str_equal);
 
 // FIXME: it'd be nice if this supported arg2
@@ -78,9 +78,38 @@
 private TimeRange time_range;
 private RemoteMonitor? proxy_object = null;
 
+private class NotificationData {
+public Variant time_range;
+}
+private SListNotificationData queued_notifications;
+
+[Compact]
+private class InsertionData : NotificationData
+{
+public Variant events;
+
+public InsertionData (Variant time_range, Variant events)
+{
+this.time_range = time_range;
+this.events = events;
+}
+}
+[Compact]
+private class DeletionData : NotificationData
+{
+public uint32[] event_ids;
+
+public DeletionData (Variant time_range, uint32[] event_ids)
+{
+this.time_range = time_range;
+this.event_ids = event_ids;
+}
+}
+
 public Monitor (BusName peer, string object_path,
 TimeRange tr, GenericArrayEvent templates)
 {
+queued_notifications = new SListNotificationData ();
 Bus.get_proxyRemoteMonitor (BusType.SESSION, peer,
 object_path, DBusProxyFlags.DO_NOT_LOAD_PROPERTIES |
 DBusProxyFlags.DO_NOT_CONNECT_SIGNALS,
@@ -94,6 +123,24 @@
 {
 warning (%s, err.message);
 }
+
+// Process queued notifications...
+foreach (unowned NotificationData data in queued_notifications)
+{
+if (data is InsertionData)
+{
+proxy_object.notify_insert (data.time_range,
+((InsertionData) data).events);
+}
+else if (data is DeletionData)
+{
+proxy_object.notify_delete (data.time_range,
+((DeletionData) data).event_ids);
+}
+else
+assert_not_reached ();
+}
+queued_notifications = null;
 });
 time_range = tr;
 event_templates = templates;
@@ -113,15 +160,13 @@
 return false;
 }
 
-// FIXME: we need to queue the notification if proxy_object == null
 public void notify_insert (TimeRange time_range, GenericArrayEvent events)
-requires (proxy_object != null)
 {
 var intersect_tr = time_range.intersect (this.time_range);
 if (intersect_tr != null)
 {
 var matching_events = new GenericArrayEvent ();
-for (int i=0; ievents.length; i++)
+for (int i = 0; i  events.length; i++)
 {
 if (events[i] != null  matches (events[i])
  events[i].timestamp = intersect_tr.start
@@ -132,24 +177,46 @@
 }
 if (matching_events.length  0)
 {
-DBusProxy p = (DBusProxy) proxy_object;
-debug (Notifying %s about %d insertions,
-p.get_name (), matching_events.length);
-
-proxy_object.notify_insert (intersect_tr.to_variant (),
-Events.to_variant (matching_events));
+Variant time_v = intersect_tr.to_variant ();
+// FIXME: do we want to cache this for sharing
+// between monitors?
+Variant events_v

[Zeitgeist] [Bug 924741] Re: eog plugin could not be loaded - Could not find 'Module' in '/usr/lib64/eog/plugins/zeitgeist-eog.plugin'

2012-02-01 Thread Siegfried Gevatter
Fixed, thanks!

** Changed in: zeitgeist-datasources
   Status: New = Fix Committed

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Data-Sources.
https://bugs.launchpad.net/bugs/924741

Title:
  eog plugin could not be loaded -  Could not find 'Module' in
  '/usr/lib64/eog/plugins/zeitgeist-eog.plugin'

Status in Zeitgeist Data-Sources:
  Fix Committed

Bug description:
  Starting eog gives

  
  (eog:26587): libpeas-WARNING **: Could not find 'Module' in 
'/usr/lib64/eog/plugins/zeitgeist-eog.plugin'

  (eog:26587): libpeas-WARNING **: Error loading '/usr/lib64/eog/plugins
  /zeitgeist-eog.plugin'

  
  which can be easily solved by correcting in the 

  [Eog Plugin] - [Plugin]

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist-datasources/+bug/924741/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 743857] Re: zeitgeist-daemon crashed with DatabaseError in execute(): database disk image is malformed

2012-02-02 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/743857

Title:
  zeitgeist-daemon crashed with DatabaseError in execute(): database
  disk image is malformed

Status in Zeitgeist Framework:
  Fix Released
Status in “zeitgeist” package in Ubuntu:
  Fix Released

Bug description:
  Binary package hint: zeitgeist

  ub

  ProblemType: Crash
  DistroRelease: Ubuntu 11.04
  Package: zeitgeist-core 0.7.1-1
  ProcVersionSignature: Ubuntu 2.6.38-7.39-generic 2.6.38
  Uname: Linux 2.6.38-7-generic i686
  Architecture: i386
  Date: Sun Mar 27 22:50:13 2011
  ExecutablePath: /usr/bin/zeitgeist-daemon
  InstallationMedia: Ubuntu 11.04 Natty Narwhal - Alpha i386 (20110302)
  InterpreterPath: /usr/bin/python2.7
  ProcCmdline: /usr/bin/python /usr/bin/zeitgeist-daemon
  ProcEnviron:
   SHELL=/bin/bash
   LANGUAGE=it_IT:en
   LANG=it_IT.UTF-8
  PythonArgs: ['/usr/bin/zeitgeist-daemon']
  SourcePackage: zeitgeist
  Title: zeitgeist-daemon crashed with DatabaseError in execute(): database 
disk image is malformed
  UpgradeStatus: Upgraded to natty on 2011-03-25 (2 days ago)
  UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/743857/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 884193] Re: Add a way to query only a specific class - and NOT sub classes

2012-02-02 Thread Siegfried Gevatter
This doesn't need any changes in libzeitgeist, does it?

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/884193

Title:
  Add a way to query only a specific class - and NOT sub classes

Status in Zeitgeist Client Library:
  New
Status in Zeitgeist Framework:
  Fix Released

Bug description:
  The problem is that nfo:FileDataObject (which we use as manifestation
  for all files) has subclasses nfo:RemoteDataObject and
  nfo:EmbeddedFileDataObject which we may not be interested in querying
  for (at least, we're not in Unity). In Unity we qualify our queries by
  restricting them to also have subject prefix file:*.

  Not only does this feel slightly hackish, but it is also slower since
  the indexes are used less effectively. I propose adding a new modifier
  + to the manifestation and interpretation (for both event and
  subject)  that signifies that the field must be matched exactly,
  without subtype expansion.

  ie:

Event.new_for_values (manifestation=FILE_DATA_OBJECT)

  matches also remote- and embedded objects, while prepending a +
  forces the matching to be strict:

Event.new_for_values (manifestation=++FILE_DATA_OBJECT)

To manage notifications about this bug go to:
https://bugs.launchpad.net/libzeitgeist/+bug/884193/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 884192] Re: Update to shared-desktop-ontologies-0.8

2012-02-02 Thread Siegfried Gevatter
** Changed in: libzeitgeist
Milestone: None = 0.3.14

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/884192

Title:
  Update to shared-desktop-ontologies-0.8

Status in Zeitgeist Client Library:
  New
Status in Zeitgeist Framework:
  Fix Released

Bug description:
  The shared-desktop-ontologies that we use has recently released
  version 0.8. Among a range of other new classes it includes
  nfo:WebDataObject which is of particular interest to us as it allows
  us to properly describe web pages (since nfo:WebDataObject is not a
  subclass of nfo:FileDataObject, unlike nfo:RemoteDtaObject which has
  caused us some pain).

To manage notifications about this bug go to:
https://bugs.launchpad.net/libzeitgeist/+bug/884192/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 884192] Re: Update to shared-desktop-ontologies-0.8

2012-02-02 Thread Siegfried Gevatter
** Branch unlinked: lp:~rainct/zeitgeist/update-ontology-feb2012

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/884192

Title:
  Update to shared-desktop-ontologies-0.8

Status in Zeitgeist Client Library:
  In Progress
Status in Zeitgeist Framework:
  Fix Released

Bug description:
  The shared-desktop-ontologies that we use has recently released
  version 0.8. Among a range of other new classes it includes
  nfo:WebDataObject which is of particular interest to us as it allows
  us to properly describe web pages (since nfo:WebDataObject is not a
  subclass of nfo:FileDataObject, unlike nfo:RemoteDtaObject which has
  caused us some pain).

To manage notifications about this bug go to:
https://bugs.launchpad.net/libzeitgeist/+bug/884192/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 884193] Re: Add a way to query only a specific class - and NOT sub classes

2012-02-03 Thread Siegfried Gevatter
I'm closing the libzeitgeist task then.

** Changed in: libzeitgeist
   Status: New = Invalid

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/884193

Title:
  Add a way to query only a specific class - and NOT sub classes

Status in Zeitgeist Client Library:
  Invalid
Status in Zeitgeist Framework:
  Fix Released

Bug description:
  The problem is that nfo:FileDataObject (which we use as manifestation
  for all files) has subclasses nfo:RemoteDataObject and
  nfo:EmbeddedFileDataObject which we may not be interested in querying
  for (at least, we're not in Unity). In Unity we qualify our queries by
  restricting them to also have subject prefix file:*.

  Not only does this feel slightly hackish, but it is also slower since
  the indexes are used less effectively. I propose adding a new modifier
  + to the manifestation and interpretation (for both event and
  subject)  that signifies that the field must be matched exactly,
  without subtype expansion.

  ie:

Event.new_for_values (manifestation=FILE_DATA_OBJECT)

  matches also remote- and embedded objects, while prepending a +
  forces the matching to be strict:

Event.new_for_values (manifestation=++FILE_DATA_OBJECT)

To manage notifications about this bug go to:
https://bugs.launchpad.net/libzeitgeist/+bug/884193/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~mhr3/zeitgeist/refactoring into lp:zeitgeist

2012-02-06 Thread Siegfried Gevatter
Review: Approve

Good work.

You aren't setting `is_read_only' to false anywhere. Other than that, looks 
good.
-- 
https://code.launchpad.net/~mhr3/zeitgeist/refactoring/+merge/91334
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 926652] Re: security/privacy hole in zeitgeist

2012-02-06 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Importance: Undecided = Low

** Changed in: zeitgeist
   Status: New = Fix Committed

** Changed in: zeitgeist
Milestone: None = 0.9.0

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/926652

Title:
  security/privacy hole in zeitgeist

Status in Zeitgeist Framework:
  Fix Committed
Status in “zeitgeist” package in Ubuntu:
  Confirmed

Bug description:
  zeitgeist data files don't seem to use the write permissions by
  default:

  user@machine:~/.local/share/zeitgeist$ ls -l
  total 7244
  -rw-r--r-- 1 user user 3776512 2012-02-03 23:47 activity.sqlite
  -rw-rw-r-- 1 user user 1996800 2011-10-17 03:09 activity.sqlite.bck
  -rw-r--r-- 1 user user 1623848 2012-02-03 23:47 activity.sqlite-journal

  so that any user on the same machine (or with network access to the
  home drive), including the guest user, will be able to read the highly
  sensitive private information of everybody else and use it to
  blackmail the users, or whatever nasty things one could do with
  private information.

  this could be fixed by having the right permissions or even better by
  making all the privacy-killing features of ubuntu opt in...

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/926652/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 624310] Re: Large requests increase memory usage considerably

2012-02-06 Thread Siegfried Gevatter
** Also affects: zeitgeist (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Zeitgeist
Extensions, which is the registrant for Zeitgeist Extensions.
https://bugs.launchpad.net/bugs/624310

Title:
  Large requests increase memory usage considerably

Status in Zeitgeist Framework:
  In Progress
Status in Zeitgeist Extensions:
  New
Status in “zeitgeist” package in Ubuntu:
  New

Bug description:
  I'm seeing with standalone Sezen that after running it, mem usage of
  the zeitgeist-daemon process goes up from ~13MB to ~40MB, this is
  understandable as when Sezen is starting, it does one big query where
  it asks for everything grouped by most recent subjects and in my case
  this returns ~11 thousand events, so the extra 30MB can be explained
  by allocating memory for the DBus reply.

  Still, my question is whether Zeitgeist should be at mercy of the
  applications, where nothing prevents them from spiking the memory
  usage of the core process. (I already saw a couple of times zeitgeist
  using 80-100MB of memory on my system). Perhaps there's a way to tell
  python dbus to free its buffers?

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/624310/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 902595] Re: gnome-terminal started from Dash never in most frequently used

2012-02-06 Thread Siegfried Gevatter
** Changed in: zeitgeist-datahub
   Status: Fix Committed = Fix Released

** Changed in: zeitgeist-datahub
Milestone: None = 0.8.0

** Changed in: zeitgeist-datahub
 Assignee: (unassigned) = Michal Hruby (mhr3)

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is the registrant for Zeitgeist Datahub.
https://bugs.launchpad.net/bugs/902595

Title:
  gnome-terminal started from Dash never in most frequently used

Status in Zeitgeist Datahub:
  Fix Released
Status in “zeitgeist-datahub” package in Ubuntu:
  Confirmed

Bug description:
  See bug 879330.  gnome-terminal is virtually the only application I
  ever start from Dash (click, type ter, click on gnome-terminal).  In
  spite of this it is never in the most frequently used applications
  category.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: zeitgeist-core 0.8.2-1
  ProcVersionSignature: Ubuntu 3.0.0-13.22-generic 3.0.6
  Uname: Linux 3.0.0-13-generic x86_64
  ApportVersion: 1.23-0ubuntu4
  Architecture: amd64
  Date: Sat Dec 10 19:52:16 2011
  ExecutablePath: /usr/bin/zeitgeist-daemon
  InstallationMedia: Ubuntu 10.10 Maverick Meerkat - Release amd64 (20101007)
  InterpreterPath: /usr/bin/python2.7
  PackageArchitecture: all
  ProcEnviron:
   SHELL=/bin/bash
   PATH=(custom, no user)
   LANG=en_US.UTF-8
  SourcePackage: zeitgeist
  UpgradeStatus: Upgraded to oneiric on 2011-09-27 (74 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist-datahub/+bug/902595/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 869879] Re: Desktop ID is not extracted correctly

2012-02-06 Thread Siegfried Gevatter
** Changed in: zeitgeist-datahub
   Status: Fix Committed = Fix Released

** Changed in: zeitgeist-datahub
Milestone: None = 0.8.0

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is the registrant for Zeitgeist Datahub.
https://bugs.launchpad.net/bugs/869879

Title:
  Desktop ID is not extracted correctly

Status in Zeitgeist Datahub:
  Fix Released

Bug description:
  Desktop IDs are not simple basenames of the full desktop file path.
  According to freedesktop's menu spec, subdirectories of AppDir
  (usually XDG_DATA_DIR / applications) are also part of the ID, ie
  /usr/share/applications/kde4/kate.desktop has desktop ID
  kde4-kate.desktop, not just kate.desktop.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist-datahub/+bug/869879/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~rainct/zeitgeist/ugly-as-hell into lp:zeitgeist

2012-02-07 Thread Siegfried Gevatter
Review: Disapprove


-- 
https://code.launchpad.net/~rainct/zeitgeist/ugly-as-hell/+merge/90848
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~rainct/zeitgeist/ugly-as-hell into lp:zeitgeist

2012-02-07 Thread Siegfried Gevatter
The proposal to merge lp:~rainct/zeitgeist/ugly-as-hell into lp:zeitgeist has 
been updated.

Status: Needs review = Rejected

For more details, see:
https://code.launchpad.net/~rainct/zeitgeist/ugly-as-hell/+merge/90848
-- 
https://code.launchpad.net/~rainct/zeitgeist/ugly-as-hell/+merge/90848
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 910199] Re: InstallMonitor called twice when using python bindings

2012-02-07 Thread Siegfried Gevatter
** Changed in: zeitgeist
 Assignee: (unassigned) = Siegfried Gevatter (rainct)

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/910199

Title:
  InstallMonitor called twice when using python bindings

Status in Zeitgeist Framework:
  Confirmed

Bug description:
  If a python app is using a monitor, it'll call InstallMonitor method
  twice (and the second call is usually quietly ignored). Still this
  shouldn't happen.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/910199/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 922620] Re: Fix failing test cases: testBlacklistSignals and testDataSourceSignals

2012-02-07 Thread Siegfried Gevatter
** Changed in: zeitgeist
 Assignee: (unassigned) = Siegfried Gevatter (rainct)

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/922620

Title:
  Fix failing test cases: testBlacklistSignals and testDataSourceSignals

Status in Zeitgeist Framework:
  Triaged

Bug description:
  What the title says.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/922620/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 910199] Re: InstallMonitor called twice when using python bindings

2012-02-07 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Importance: High = Low

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/910199

Title:
  InstallMonitor called twice when using python bindings

Status in Zeitgeist Framework:
  Confirmed

Bug description:
  If a python app is using a monitor, it'll call InstallMonitor method
  twice (and the second call is usually quietly ignored). Still this
  shouldn't happen.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/910199/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 919614] Re: python-zeitgeist 0.8.99~alpha1b-1ubuntu1~ppa1

2012-02-08 Thread Siegfried Gevatter
Thank you for your bug report.

This is already fixed in Debian and Ubuntu. I've just uploaded the fix
to the PPA too (and updated it to 0.9 Alpha 2).

** Changed in: zeitgeist
   Status: New = Fix Released

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/919614

Title:
  python-zeitgeist 0.8.99~alpha1b-1ubuntu1~ppa1

Status in Zeitgeist Framework:
  Fix Released

Bug description:
  UBUNTU 11.10

  ProblemType: Package
  Architecture: amd64
  Date: Fri Jan 20 13:34:33 2012
  Package: python-zeitgeist 0.8.99~alpha1b-1ubuntu1~ppa1
  SourcePackage: zeitgeist
  ErrorMessage:
   trying to overwrite '/usr/share/pyshared/zeitgeist/__init__.py', which is 
also in package zeitgeist-core 0.8.2-1
  DpkgTerminalLog:

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/919614/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 928804] [NEW] Blacklist doesn't handle empty current_uri

2012-02-08 Thread Siegfried Gevatter
Public bug reported:

The blacklist extension needs to take into account that an empty
`current_uri' will get the value of `uri'. It currently isn't doing so.

This can be reproduced with a new test case: blacklist-
test.BlacklistTest.testApplyBlacklistForEventWithEmptyCurrentURI

** Affects: zeitgeist
 Importance: Medium
 Status: Confirmed

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/928804

Title:
  Blacklist doesn't handle empty current_uri

Status in Zeitgeist Framework:
  Confirmed

Bug description:
  The blacklist extension needs to take into account that an empty
  `current_uri' will get the value of `uri'. It currently isn't doing
  so.

  This can be reproduced with a new test case: blacklist-
  test.BlacklistTest.testApplyBlacklistForEventWithEmptyCurrentURI

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/928804/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 928811] [NEW] Bluebird: no test cases for Event.matches_template

2012-02-08 Thread Siegfried Gevatter
Public bug reported:

Please write some ^^

** Affects: zeitgeist
 Importance: Wishlist
 Status: Confirmed

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/928811

Title:
  Bluebird: no test cases for Event.matches_template

Status in Zeitgeist Framework:
  Confirmed

Bug description:
  Please write some ^^

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/928811/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 910445] Re: Cannot block a folder with an accent in the name

2012-02-08 Thread Siegfried Gevatter
*** This bug is a duplicate of bug 899096 ***
https://bugs.launchpad.net/bugs/899096

** This bug has been marked a duplicate of bug 899096
   Cannot block a folder with a space in the name!

-- 
You received this bug notification because you are a member of Activity
Log Manager, which is the registrant for Activity Log Manager.
https://bugs.launchpad.net/bugs/910445

Title:
  Cannot block a folder with an accent in the name

Status in Activity Log Manager for Zeitgeist:
  New

Bug description:
  In Activity Log Manager, go to the Files tab, bottom section, select a
  path that has a accent in it somewhere (e,g, /home/user/Música) and
  add it to the list. Open a file in that folder.

  The file shouldn't appear on the recent files list, but it does!  I
  tried with other folders and it worked.

To manage notifications about this bug go to:
https://bugs.launchpad.net/activity-log-manager/+bug/910445/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 899096] Re: Cannot block a folder with a space in the name!

2012-02-08 Thread Siegfried Gevatter
After writing some extensive test cases, I can say that blacklisting
with spaces and special characters works fine with Zeitgeist, so I'm
closing the Zeitgeist task.

This is a bug in Activity Log Manager, which is inserting strings like
file:///home/rainct/tmp/test/with spaces foo yeah/*. The spaces in
there need to be escaped to be a valid URI. Please construct the path
with g_build_path and use g_file_new_for_path+g_file_get_uri to get a
valid URI for use with Zeitgeist.

** Changed in: zeitgeist
   Status: New = Invalid

** Changed in: activity-log-manager
   Importance: Undecided = Medium

** Changed in: activity-log-manager
   Status: New = Triaged

** Changed in: activity-log-manager
Milestone: None = 0.9.1

-- 
You received this bug notification because you are a member of Activity
Log Manager, which is the registrant for Activity Log Manager.
https://bugs.launchpad.net/bugs/899096

Title:
  Cannot block a folder with a space in the name!

Status in Activity Log Manager for Zeitgeist:
  Triaged
Status in Zeitgeist Framework:
  Invalid

Bug description:
  In Activity Log Manager, go to the Files tab, bottom section, select a
  path that has a space in it somewhere and add it to the list. Open a
  file in that folder.

  The file shouldn't appear on the recent files list, but it does! It
  only works if you rename the folders without a space, e.g. Two_Words
  instead of Two Words.

To manage notifications about this bug go to:
https://bugs.launchpad.net/activity-log-manager/+bug/899096/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 921531] Re: Migrate database to new version updating ontology

2012-02-08 Thread Siegfried Gevatter
(This will also trigger the permission updates for the database and
directory.)

** Changed in: zeitgeist
   Importance: Low = Medium

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/921531

Title:
  Migrate database to new version updating ontology

Status in Zeitgeist Framework:
  Triaged

Bug description:
  Websites and stuff.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/921531/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 852486] Re: Check for duplicate events when crawling the home folder

2012-02-08 Thread Siegfried Gevatter
I'm closing this bug report, since like Karl says it looks like it's
already been implemented, and the crawler is gone in the Vala branch
anyway.

** Changed in: activity-log-manager
   Status: New = Invalid

-- 
You received this bug notification because you are a member of Activity
Log Manager, which is the registrant for Activity Log Manager.
https://bugs.launchpad.net/bugs/852486

Title:
  Check for duplicate events when crawling the home folder

Status in Activity Log Manager for Zeitgeist:
  Invalid

Bug description:
  Right now Activity Log Manager takes the home folder and searches all
  the file's last Modification time and enters a SAVE event for those
  file. The events can be duplicate.

  In other case, if the crawler is interrupted, then starting it again
  might lead to duplicate events

To manage notifications about this bug go to:
https://bugs.launchpad.net/activity-log-manager/+bug/852486/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 792288] Re: Activity Log Manager fails to launch

2012-02-08 Thread Siegfried Gevatter
I'm closing this since Activity Log Manager has been rewritten in Vala.

** Changed in: activity-log-manager
   Status: New = Invalid

-- 
You received this bug notification because you are a member of Activity
Log Manager, which is the registrant for Activity Log Manager.
https://bugs.launchpad.net/bugs/792288

Title:
  Activity Log Manager fails to launch

Status in Activity Log Manager for Zeitgeist:
  Invalid

Bug description:
  Installed from the PPA along with Zeitgeist 0.8.0 . When trying to
  launch activity-log-manager i get this:

  Traceback (most recent call last):
File /usr/bin/activity-log-manager, line 87, in module
  window = Window()
File /usr/share/activity-log-manager/src/window.py, line 49, in __init__
  self._set_up_ui()
File /usr/share/activity-log-manager/src/window.py, line 61, in _set_up_ui
  self._set_up_applications_tab()
File /usr/share/activity-log-manager/src/window.py, line 97, in 
_set_up_applications_tab
  self.applications_tab = ApplicationsTab()
File /usr/share/activity-log-manager/src/window.py, line 345, in __init__
  self.app_chooser_dialog = ApplicationsChooserDialog()
File /usr/share/activity-log-manager/src/window.py, line 713, in __init__
  self._set_up_ui()
File /usr/share/activity-log-manager/src/window.py, line 721, in 
_set_up_ui
  self.treeview._populate_view()
File /usr/share/activity-log-manager/src/window.py, line 686, in 
_populate_view
  pix = self._get_pixbuf_from_gio_icon(icon)
File /usr/share/activity-log-manager/src/window.py, line 674, in 
_get_pixbuf_from_gio_icon
  pix = icon_info.load_icon()
  glib.GError: Unrecognized image file format

  
  I also checked out Bug #784067 but zeitgeist is running in my case:
  [INFO - root] An existing instance was found. Please use --replace to quit it 
and start a new instance.

To manage notifications about this bug go to:
https://bugs.launchpad.net/activity-log-manager/+bug/792288/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 783569] Re: Only show apps in list that actually log

2012-02-08 Thread Siegfried Gevatter
** Changed in: activity-log-manager
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Activity
Log Manager, which is the registrant for Activity Log Manager.
https://bugs.launchpad.net/bugs/783569

Title:
  Only show apps in list that actually log

Status in Activity Log Manager for Zeitgeist:
  Fix Released

Bug description:
  The list of apps shows  a whole lot of things that don't log, for
  example Calculator, htop, Mahjong, D-Feet... I think it would be
  convenient to only show those apps that actually log to zeitgeist.

To manage notifications about this bug go to:
https://bugs.launchpad.net/activity-log-manager/+bug/783569/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 783566] Re: Logging Active confusingly looks like Apply button

2012-02-08 Thread Siegfried Gevatter
** Changed in: activity-log-manager
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Activity
Log Manager, which is the registrant for Activity Log Manager.
https://bugs.launchpad.net/bugs/783566

Title:
  Logging Active confusingly looks like Apply button

Status in Activity Log Manager for Zeitgeist:
  Fix Released

Bug description:
  The 'Logging Active' button in the bottom right corner is confusing.
  When I tried out the history manager for the first time, I went
  through each tab, and after that intuitively aimed for the Apply
  button - which turns out to disable logging instead.

  If no confirmation is needed for changes to apply, I suggest to put a
  Close button at the bottom. Otherwise I'm struggling to close the
  dialogue.

  And have either a real toggle button to globally disable  logging, or
  call it Disable logging to make it clearer what it does. And move it
  into the dialogue content area.

To manage notifications about this bug go to:
https://bugs.launchpad.net/activity-log-manager/+bug/783566/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 784169] Re: Missing icon

2012-02-08 Thread Siegfried Gevatter
** Changed in: activity-log-manager
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Activity
Log Manager, which is the registrant for Activity Log Manager.
https://bugs.launchpad.net/bugs/784169

Title:
  Missing icon

Status in Activity Log Manager for Zeitgeist:
  Fix Released

Bug description:
  I just installed the application on 10.10 (I also have zeitgeist 0.8).
  In applications-extras, a question mark is shown instead of the icon.
  I attach a screenshot.

To manage notifications about this bug go to:
https://bugs.launchpad.net/activity-log-manager/+bug/784169/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 785232] Re: Application list not sorted in any particular(ly obvious) order

2012-02-08 Thread Siegfried Gevatter
** Changed in: activity-log-manager
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Activity
Log Manager, which is the registrant for Activity Log Manager.
https://bugs.launchpad.net/bugs/785232

Title:
  Application list not sorted in any particular(ly obvious) order

Status in Activity Log Manager for Zeitgeist:
  Fix Released

Bug description:
  Suggestion: Sort by most frequently used or alphabetically.

To manage notifications about this bug go to:
https://bugs.launchpad.net/activity-log-manager/+bug/785232/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 925637] Re: Folder blacklisted list should be enhanced to match with the prototype

2012-02-08 Thread Siegfried Gevatter
Unrelated, but it should probably also add a blacklist on current_uri.

-- 
You received this bug notification because you are a member of Activity
Log Manager, which is the registrant for Activity Log Manager.
https://bugs.launchpad.net/bugs/925637

Title:
  Folder blacklisted list should be enhanced to match with the prototype

Status in Activity Log Manager for Zeitgeist:
  Confirmed

Bug description:
  Right now files blocklisting is just a list of folders. It should contain a 
icon and nautilus icon in case of special folders
  Right now it looks like this
  http://i.imgur.com/MfD5E.png

  and should look like
  
https://lh4.googleusercontent.com/VzHz73ZkGqMdtsqK3uelIRMJqCXsQ74Y6WhP4qLRLkTNdOoHAZrgEkurV-N_wSPFQwr5inz0gT0iL5hb6rXk-Ughj1FAk_A3RXtgFIM9L8K2c_kJ2Ok

To manage notifications about this bug go to:
https://bugs.launchpad.net/activity-log-manager/+bug/925637/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 910761] Re: Deleting history does not work in Oneiric

2012-02-08 Thread Siegfried Gevatter
** Changed in: activity-log-manager
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Activity
Log Manager, which is the registrant for Activity Log Manager.
https://bugs.launchpad.net/bugs/910761

Title:
  Deleting history does not work in Oneiric

Status in Activity Log Manager for Zeitgeist:
  Fix Released

Bug description:
  Hello, I installed activity-log-manager from the Oneiric repository
  (0.8.0-1~oneiric1). Blacklisting directories works, but deleting
  history does not. Whether I clear the history by date or by time
  range, old items are still present if I start to type in the dash.

To manage notifications about this bug go to:
https://bugs.launchpad.net/activity-log-manager/+bug/910761/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 618639] Re: Logs 3 events for each recent file

2012-02-08 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Status: Opinion = Invalid

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is the registrant for Zeitgeist Datahub.
https://bugs.launchpad.net/bugs/618639

Title:
  Logs 3 events for each recent file

Status in Zeitgeist Framework:
  Invalid
Status in Zeitgeist Datahub:
  Confirmed

Bug description:
  Each event for a recent file is logged 3 times. An AccessEvent,
  ModifyEvent, and a CreateEvent. Scatter shooting when we can't figure
  out the event type greatly decreases the value of the logged data.

  We need to figure something out here I think...

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/618639/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 618639] Re: Logs 3 events for each recent file

2012-02-08 Thread Siegfried Gevatter
** Changed in: zeitgeist-datahub
Milestone: None = 0.9.0

** Changed in: zeitgeist-datahub
 Assignee: Michal Hruby (mhr3) = Siegfried Gevatter (rainct)

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is the registrant for Zeitgeist Datahub.
https://bugs.launchpad.net/bugs/618639

Title:
  Logs 3 events for each recent file

Status in Zeitgeist Framework:
  Invalid
Status in Zeitgeist Datahub:
  Confirmed

Bug description:
  Each event for a recent file is logged 3 times. An AccessEvent,
  ModifyEvent, and a CreateEvent. Scatter shooting when we can't figure
  out the event type greatly decreases the value of the logged data.

  We need to figure something out here I think...

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/618639/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/fts++ into lp:zeitgeist

2012-02-08 Thread Siegfried Gevatter
Review: Needs Fixing

Awesome! C++ FTS ftw.

- Add COPYING.GPL3, otherwise the tarball can't be re-distributed.

- Considering sharing a get_flags_for_log_level or even set_log_level
  function between ZG and FTS?

- s/ver != DatabaseSchema.CORE_SCHEMA_VERSION)/ver  
DatabaseSchema.CORE_SCHEMA_VERSION/
  What's the rationale for this? We don't know changes won't break compatibility

- Can you explain the // Don't disconnect monitors using service names?

I didn't really review the C++ stuff (I'm asuming you and Mikkel reviewed each 
other's stuff already?).
-- 
https://code.launchpad.net/~zeitgeist/zeitgeist/fts++/+merge/92022
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/fts++ into lp:zeitgeist

2012-02-10 Thread Siegfried Gevatter
Review: Approve

OK, merging it, but there's some outstanding stuff:

 * Important: the TableLookup in FTS can currently explode. The new schema 
version needs to add AUTOINCREMENT to the `id' row of all tables in 
TableLookup. We should do this before releasing a new tarball.

 * TableLookup.get_value: please prepare the query in the constructor.

 * Configure isn't checking for xapian being there

 * Add a flag to disable FTS? (keeping the Xapian dependency avoidable)
-- 
https://code.launchpad.net/~zeitgeist/zeitgeist/fts++/+merge/92022
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~mhr3/zeitgeist/fts-extras into lp:zeitgeist

2012-02-10 Thread Siegfried Gevatter
Review: Approve

Awesome.
-- 
https://code.launchpad.net/~mhr3/zeitgeist/fts-extras/+merge/92430
Your team Zeitgeist Framework Team is subscribed to branch 
lp:~zeitgeist/zeitgeist/fts++.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 930023] Re: Activity logger logging stopped button not working

2012-02-10 Thread Siegfried Gevatter
** Project changed: zeitgeist = activity-log-manager

-- 
You received this bug notification because you are a member of Activity
Log Manager, which is the registrant for Activity Log Manager.
https://bugs.launchpad.net/bugs/930023

Title:
  Activity logger logging stopped button not working

Status in Activity Log Manager for Zeitgeist:
  New

Bug description:
  I don't want Zeitgeist recording anything at all so I clicked the
  button in the bottom-right hand corner and now it says logging
  stopped. It's been like this for a while now, so I was surprised when
  I checked this morning and clicked on the Forget my activities...
  Delete button and the dialog reported that it deleted 2 events. How
  can it have recorded two new events if it's supposed to have stopped
  logging?

To manage notifications about this bug go to:
https://bugs.launchpad.net/activity-log-manager/+bug/930023/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~rainct/zeitgeist/insert-event-fixes into lp:zeitgeist

2012-02-10 Thread Siegfried Gevatter
Siegfried Gevatter has proposed merging lp:~rainct/zeitgeist/insert-event-fixes 
into lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)
Related bugs:
  Bug #928804 in Zeitgeist Framework: Blacklist doesn't handle empty 
current_uri
  https://bugs.launchpad.net/zeitgeist/+bug/928804

For more details, see:
https://code.launchpad.net/~rainct/zeitgeist/insert-event-fixes/+merge/92468

- Pre-process events before they are send to the extensions (LP: #628804).
- Fix Storage Monitor to take into account that events may be NULL.
- Fix error messages (related to MOVE_EVENT) that were interchanged.
-- 
https://code.launchpad.net/~rainct/zeitgeist/insert-event-fixes/+merge/92468
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~rainct/zeitgeist/insert-event-fixes into lp:zeitgeist.
=== modified file 'extensions/fts++/test/test-indexer.cpp'
--- extensions/fts++/test/test-indexer.cpp	2012-02-10 12:07:27 +
+++ extensions/fts++/test/test-indexer.cpp	2012-02-10 13:40:28 +
@@ -169,13 +169,22 @@
 static guint
 index_event (Fixture *fix, ZeitgeistEvent *event)
 {
+  GPtrArray *events;
   guint event_id = 0;
+  guint *event_ids;
+  int num_events_inserted;
 
   // add event to DBs
-  event_id = zeitgeist_engine_insert_event (ZEITGEIST_ENGINE (fix-db),
-event, NULL, NULL);
+  events = g_ptr_array_new ();
+  g_ptr_array_add (events, event);
+  event_ids = zeitgeist_engine_insert_events (ZEITGEIST_ENGINE (fix-db),
+  events, NULL,
+  num_events_inserted, NULL);
+  g_assert_cmpint (1, ==, num_events_inserted);
+  event_id = *event_ids;
+  g_ptr_array_unref (events);
 
-  GPtrArray *events = g_ptr_array_new_with_free_func (g_object_unref);
+  events = g_ptr_array_new_with_free_func (g_object_unref);
   g_ptr_array_add (events, event); // steal event ref
   zeitgeist_indexer_index_events (fix-indexer, events);
   g_ptr_array_unref (events);

=== modified file 'extensions/storage-monitor.vala'
--- extensions/storage-monitor.vala	2012-02-02 18:57:35 +
+++ extensions/storage-monitor.vala	2012-02-10 13:40:28 +
@@ -269,10 +269,11 @@
 {
 for (int i = 0; i  events.length; ++i)
 {
+if (events[i] == null) continue;
 for (int j = 0; j  events[i].subjects.length; ++j)
 {
 Subject subject = events[i].subjects[j];
-if (subject.storage == )
+if (Utils.is_empty_string (subject.storage))
 subject.storage = find_storage_for_uri (subject.uri);
 }
 }

=== modified file 'src/engine.vala'
--- src/engine.vala	2012-02-07 17:02:05 +
+++ src/engine.vala	2012-02-10 13:40:28 +
@@ -27,6 +27,7 @@
 
 using Zeitgeist;
 using Zeitgeist.SQLite;
+using Zeitgeist.Utils;
 
 namespace Zeitgeist
 {
@@ -62,21 +63,74 @@
 public uint32[] insert_events (GenericArrayEvent events,
 BusName? sender=null) throws EngineError
 {
+// Any changes to events need to be done here so they'll
+// be taken into consideration by the extensions (LP: #928804).
+for (int i = 0; i  events.length; ++i)
+{
+preprocess_event (events[i]);
+}
+
 extension_collection.call_pre_insert_events (events, sender);
 uint32[] event_ids = new uint32[events.length];
 database.begin_transaction ();
 for (int i = 0; i  events.length; ++i)
 {
 if (events[i] != null)
-event_ids[i] = insert_event (events[i], sender);
+event_ids[i] = insert_event (events[i]);
 }
 database.end_transaction ();
 extension_collection.call_post_insert_events (events, sender);
 return event_ids;
 }
 
-public uint32 insert_event (Event event,
-BusName? sender=null) throws EngineError
+private void preprocess_event (Event event) throws EngineError
+{
+// Iterate through subjects and check for validity
+for (int i = 0; i  event.num_subjects(); ++i)
+{
+unowned Subject subject = event.subjects[i];
+
+// If current_uri is unset, give it the same value as URI
+if (is_empty_string (subject.current_uri))
+subject.current_uri = subject.uri;
+
+if (event.interpretation == ZG.MOVE_EVENT
+ subject.uri == subject.current_uri)
+{
+throw new EngineError.INVALID_ARGUMENT (
+Redundant event: event.interpretation indicates  +
+the uri has been moved yet the subject.uri and  +
+subject.current_uri are identical);
+}
+else if (event.interpretation != ZG.MOVE_EVENT
+ subject.uri != subject.current_uri

[Zeitgeist] [Merge] lp:~rainct/zeitgeist/schema6 into lp:zeitgeist

2012-02-10 Thread Siegfried Gevatter
Siegfried Gevatter has proposed merging lp:~rainct/zeitgeist/schema6 into 
lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)

For more details, see:
https://code.launchpad.net/~rainct/zeitgeist/schema6/+merge/92519
-- 
https://code.launchpad.net/~rainct/zeitgeist/schema6/+merge/92519
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~rainct/zeitgeist/schema6 into lp:zeitgeist.
=== modified file 'NEWS'
--- NEWS	2012-02-10 14:42:54 +
+++ NEWS	2012-02-10 17:02:09 +
@@ -6,6 +6,8 @@
  - The FTS module in Python has been replaced with a C/C++ implementation.
  - Pre-process events *before* they are send to extensions (LP: #628804).
  - Minor fixes.
+ - Introduced new DB schema (version 6); cached tables may no longer
+   re-use row IDs.
 
 Python API:
  - Fixed signal/monitor reconnection to avoid duplicated notifications.
@@ -42,9 +44,10 @@
 
 Engine:
 
- - The language for extensions has changes from Python to Vala.
+ - Changed the language for extensions from Python to Vala.
  - The post_get_events hook is no longer supported.
  - The FTS and Histogram extensions are now shipped together with Zeitgeist.
+ - Introduced new DB schema (version 5).
 
 -
 -

=== modified file 'src/sql-schema.vala'
--- src/sql-schema.vala	2012-02-06 16:11:53 +
+++ src/sql-schema.vala	2012-02-10 17:02:09 +
@@ -35,7 +35,7 @@
 {
 
 public const string CORE_SCHEMA = core;
-public const int CORE_SCHEMA_VERSION = 5;
+public const int CORE_SCHEMA_VERSION = 6;
 
 public static void ensure_schema (Sqlite.Database database)
 throws EngineError
@@ -48,19 +48,55 @@
 // most likely a new DB
 create_schema (database);
 }
-else if (schema_version == 4)
+else if (schema_version == 4 || schema_version == 5)
 {
-// DB from latest Python Zeitgeist, which we can upgrade
-try
-{
-  Utils.backup_database ();
-}
-catch (Error backup_error)
-{
-var msg = Database backup failed:  + backup_error.message;
-throw new EngineError.BACKUP_FAILED (msg);
-}
+backup_database ();
+
+string[] tables = { interpretation, manifestation,
+mimetype, actor };
+
+// Rename old tables that need to be replaced
+foreach (unowned string table in tables)
+{
+exec_query (database,
+ALTER TABLE %s RENAME TO %s_old.printf (table, table));
+}
+
+// Create any missing tables and indices
 create_schema (database);
+
+// Migrate data to the new tables and delete the old ones
+foreach (unowned string table in tables)
+{
+exec_query (database,
+INSERT INTO %s SELECT id, value FROM %s_old.printf (
+table, table));
+
+exec_query (database, DROP TABLE %s_old.printf (table));
+}
+
+// Ontology update
+exec_query (database,
+INSERT OR IGNORE INTO manifestation (value) VALUES ('%s')
+.printf (NFO.WEB_DATA_OBJECT));
+exec_query (database, 
+UPDATE event
+SET subj_manifestation=(
+SELECT id FROM manifestation WHERE value=' +
+NFO.WEB_DATA_OBJECT + ')
+WHERE
+subj_manifestation=(
+SELECT id FROM manifestation WHERE value=' +
+NFO.WEB_DATA_OBJECT + ')
+AND subj_id IN (
+SELECT id FROM uri
+WHERE
+value LIKE http://%;
+OR value LIKE https://%;
+)
+);
+
+message (Upgraded database to schema version 6.);
 }
 else if (schema_version  CORE_SCHEMA_VERSION)
 {
@@ -70,6 +106,19 @@
 }
 }
 
+private static void backup_database () throws EngineError
+{
+try
+{
+  Utils.backup_database ();
+}
+catch (Error backup_error)
+{
+var msg = Database backup failed:  + backup_error.message;
+throw new EngineError.BACKUP_FAILED (msg);
+}
+}
+
 public static int get_schema_version (Sqlite.Database database

[Zeitgeist] [Bug 930104] Re: Release checklist

2012-02-12 Thread Siegfried Gevatter
* extensions/fts.vala should be nice if FTS++ isn't installed
(install_monitor is the biggest problem here)

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/930104

Title:
  Release checklist

Status in Zeitgeist Framework:
  Triaged

Bug description:
  There are some outstanding issues we need to tackle before releasing
  stable 0.9.0:

   * Important: the TableLookup in FTS can currently explode. The new
  schema version needs to add AUTOINCREMENT to the `id' row of all
  tables in TableLookup. We should do this before releasing a new
  tarball.

   * TableLookup.get_value: please prepare the query in the constructor.

   * Configure isn't checking for xapian being there

   * Add a flag to disable FTS? (keeping the Xapian dependency
  avoidable)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/930104/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~rainct/zeitgeist/schema6 into lp:zeitgeist

2012-02-12 Thread Siegfried Gevatter
mhr3 master seiflotfy said break, so break it
-- 
https://code.launchpad.net/~rainct/zeitgeist/schema6/+merge/92519
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 931136] [NEW] Write log output to ~/.cache/zeitgeist/

2012-02-12 Thread Siegfried Gevatter
Public bug reported:

Writing log output to a file is still missing from the Python version.
We had a daily rotated file there.

** Affects: zeitgeist
 Importance: Low
 Status: Confirmed

** Changed in: zeitgeist
   Importance: Undecided = Low

** Changed in: zeitgeist
   Status: New = Confirmed

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/931136

Title:
  Write log output to ~/.cache/zeitgeist/

Status in Zeitgeist Framework:
  Confirmed

Bug description:
  Writing log output to a file is still missing from the Python version.
  We had a daily rotated file there.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/931136/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 930104] Re: Release checklist

2012-02-12 Thread Siegfried Gevatter
UPDATED CHECKLIST:

 * Add AUTOINCREMENT to tables in TableLookup.  --  DONE
 * Configure checking for Xapian being present.  --  DONE

Remaining items (not necessarily for the next tarball):
 * Prepare TableLookup.get_value in the constructor.
 * Make FTS++ optional.
 * Make the fts.vala extension behave if FTS++ isn't there.

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/930104

Title:
  Release checklist

Status in Zeitgeist Framework:
  Triaged

Bug description:
  There are some outstanding issues we need to tackle before releasing
  stable 0.9.0:

   * Important: the TableLookup in FTS can currently explode. The new
  schema version needs to add AUTOINCREMENT to the `id' row of all
  tables in TableLookup. We should do this before releasing a new
  tarball.

   * TableLookup.get_value: please prepare the query in the constructor.

   * Configure isn't checking for xapian being there

   * Add a flag to disable FTS? (keeping the Xapian dependency
  avoidable)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/930104/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 921531] Re: Migrate database to new version updating ontology

2012-02-13 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Status: Triaged = Fix Committed

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/921531

Title:
  Migrate database to new version updating ontology

Status in Zeitgeist Framework:
  Fix Committed

Bug description:
  Websites and stuff.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/921531/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 928811] Re: Bluebird: no test cases for Event.matches_template

2012-02-13 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Status: Confirmed = In Progress

** Changed in: zeitgeist
 Assignee: (unassigned) = Siegfried Gevatter (rainct)

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/928811

Title:
  Bluebird: no test cases for Event.matches_template

Status in Zeitgeist Framework:
  In Progress

Bug description:
  Please write some ^^

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/928811/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~rainct/zeitgeist/table-lookup-get-value-query into lp:zeitgeist

2012-02-13 Thread Siegfried Gevatter
Siegfried Gevatter has proposed merging 
lp:~rainct/zeitgeist/table-lookup-get-value-query into lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)

For more details, see:
https://code.launchpad.net/~rainct/zeitgeist/table-lookup-get-value-query/+merge/92843
-- 
https://code.launchpad.net/~rainct/zeitgeist/table-lookup-get-value-query/+merge/92843
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~rainct/zeitgeist/table-lookup-get-value-query into lp:zeitgeist.
=== modified file 'src/table-lookup.vala'
--- src/table-lookup.vala	2012-02-10 11:28:05 +
+++ src/table-lookup.vala	2012-02-13 20:17:19 +
@@ -33,6 +33,7 @@
 private HashTableint, string id_to_value;
 private HashTablestring, int value_to_id;
 private Sqlite.Statement insertion_stmt;
+private Sqlite.Statement retrieval_stmt;
 
 public TableLookup (Database database, string table_name)
 {
@@ -42,6 +43,7 @@
 value_to_id = new HashTablestring, int(str_hash, str_equal);
 
 int rc;
+string sql;
 
 rc = db.exec (SELECT id, value FROM  + table,
 (n_columns, values, column_names) =
@@ -56,10 +58,19 @@
 rc, db.errmsg ());
 }
 
-string sql = INSERT INTO  + table +  (value) VALUES (?);
+sql = INSERT INTO  + table +  (value) VALUES (?);
 rc = db.prepare_v2 (sql, -1, out insertion_stmt);
 if (rc != Sqlite.OK)
 {
+// FIXME: throw exception and propagate it up to
+//zeitgeist-daemon to abort with DB error?
+critical (SQL error: %d, %s\n, rc, db.errmsg ());
+}
+
+sql = SELECT value FROM  + table +  WHERE id=?;
+rc = db.prepare_v2 (sql, -1, out retrieval_stmt);
+if (rc != Sqlite.OK)
+{
 critical (SQL error: %d, %s\n, rc, db.errmsg ());
 }
 }
@@ -93,23 +104,27 @@
 unowned string val = id_to_value.lookup (id);
 if (val != null) return val;
 
-// The above statement isn't exactly true. If this is a standalone
-// reader in a separate process, the values won't be kept updated
-// so we need to query the DB if we don't find it.
+// Unless this is a standalone reader in a separate process, in
+// which case the values won't be kept updated, so we need to
+// query the DB if we don't find it.
 int rc;
+string? text = null;
 
-rc = db.exec (SELECT value FROM %s WHERE id=%d.printf (table, id),
-(n_columns, values, column_names) =
-{
-id_to_value.insert (id, values[0]);
-value_to_id.insert (values[0], id);
-return 0;
-}, null);
-if (rc != Sqlite.OK)
-{
-critical (Can't get data from table %s: %d, %s\n, table,
+retrieval_stmt.reset ();
+retrieval_stmt.bind_int64 (1, id);
+if ((rc = retrieval_stmt.step()) == Sqlite.ROW)
+{
+text = retrieval_stmt.column_text (0);
+id_to_value.insert (id, text);
+value_to_id.insert (text, id);
+rc = retrieval_stmt.step ();
+}
+if (rc != Sqlite.DONE || text == null)
+{
+critical (Error getting data from table: %d, %s\n,
 rc, db.errmsg ());
 }
+
 return id_to_value.lookup (id);
 }
 

=== modified file 'test/direct/Makefile.am'
--- test/direct/Makefile.am	2012-02-05 14:52:13 +
+++ test/direct/Makefile.am	2012-02-13 20:17:19 +
@@ -10,10 +10,10 @@
 
 TESTS = \
 	marshalling-test \
+	mimetype-test \
 	query-operators-test \
+	table-lookup-test \
 	where-clause-test \
-	table-lookup-test \
-	mimetype-test \
 	$(NULL)
 
 SRC_FILES = \
@@ -56,19 +56,19 @@
 
 DISTCLEANFILES = \
 	marshalling-test \
+	mimetype-test \
 	query-operators-test \
+	table-lookup-test \
 	where-clause-test \
-	table-lookup-test \
-	mimetype-test \
 	$(NULL)
 
 EXTRA_DIST = \
+	assertions.vapi \
 	marshalling-test.vala \
+	mimetype-test.vala \
 	query-operators-test.vala \
+	table-lookup-test.vala \
 	where-clause-test.vala \
-	table-lookup-test.vala \
-	mimetype-test.vala \
-	assertions.vapi \
 	$(NULL)
 
 VALA_V = $(VALA_V_$(V))

=== modified file 'test/direct/table-lookup-test.vala'
--- test/direct/table-lookup-test.vala	2012-02-05 14:52:13 +
+++ test/direct/table-lookup-test.vala	2012-02-13 20:17:19 +
@@ -38,6 +38,7 @@
 
 Test.add_func (/WhereClause/basic, basic_test);
 Test.add_func (/WhereClause/delete_hook, engine_test);
+Test.add_func (/WhereClause/get_value_query, get_value_with_query_test);
 
 return Test.run ();
 }
@@ -56,16 +57,28

[Zeitgeist] [Bug 928804] Re: Blacklist doesn't handle empty current_uri

2012-02-14 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/928804

Title:
  Blacklist doesn't handle empty current_uri

Status in Zeitgeist Framework:
  Fix Released

Bug description:
  The blacklist extension needs to take into account that an empty
  `current_uri' will get the value of `uri'. It currently isn't doing
  so.

  This can be reproduced with a new test case: blacklist-
  test.BlacklistTest.testApplyBlacklistForEventWithEmptyCurrentURI

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/928804/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 922620] Re: Fix failing test cases: testBlacklistSignals and testDataSourceSignals

2012-02-14 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/922620

Title:
  Fix failing test cases: testBlacklistSignals and testDataSourceSignals

Status in Zeitgeist Framework:
  Fix Released

Bug description:
  What the title says.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/922620/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 926652] Re: security/privacy hole in zeitgeist

2012-02-14 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/926652

Title:
  security/privacy hole in zeitgeist

Status in Zeitgeist Framework:
  Fix Released
Status in “zeitgeist” package in Ubuntu:
  Confirmed

Bug description:
  zeitgeist data files don't seem to use the write permissions by
  default:

  user@machine:~/.local/share/zeitgeist$ ls -l
  total 7244
  -rw-r--r-- 1 user user 3776512 2012-02-03 23:47 activity.sqlite
  -rw-rw-r-- 1 user user 1996800 2011-10-17 03:09 activity.sqlite.bck
  -rw-r--r-- 1 user user 1623848 2012-02-03 23:47 activity.sqlite-journal

  so that any user on the same machine (or with network access to the
  home drive), including the guest user, will be able to read the highly
  sensitive private information of everybody else and use it to
  blackmail the users, or whatever nasty things one could do with
  private information.

  this could be fixed by having the right permissions or even better by
  making all the privacy-killing features of ubuntu opt in...

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/926652/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~rainct/zeitgeist/matches-template into lp:zeitgeist

2012-02-15 Thread Siegfried Gevatter
Siegfried Gevatter has proposed merging lp:~rainct/zeitgeist/matches-template 
into lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)

For more details, see:
https://code.launchpad.net/~rainct/zeitgeist/matches-template/+merge/93279
-- 
https://code.launchpad.net/~rainct/zeitgeist/matches-template/+merge/93279
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~rainct/zeitgeist/matches-template into lp:zeitgeist.
=== modified file 'extensions/Makefile.am'
--- extensions/Makefile.am	2012-02-08 18:54:58 +
+++ extensions/Makefile.am	2012-02-15 18:59:17 +
@@ -70,3 +70,6 @@
 benchmark_la_LIBADD = \
 	$(ZEITGEIST_LIBS) \
 	$(NULL)
+
+distclean-local:
+	rm -f *.c *.o *.stamp *.~[0-9]~

=== modified file 'po/POTFILES.skip'
--- po/POTFILES.skip	2011-07-25 23:24:14 +
+++ po/POTFILES.skip	2012-02-15 18:59:17 +
@@ -1,1 +1,2 @@
 src/main.c
+tools/gtk/zeitgeist-data-sources-gtk.py

=== modified file 'src/datamodel.vala'
--- src/datamodel.vala	2012-02-07 14:51:50 +
+++ src/datamodel.vala	2012-02-15 18:59:17 +
@@ -4,6 +4,8 @@
  * By Seif Lotfy s...@lotfy.com
  * By Siegfried-Angel Gevatter Pujals siegfr...@gevatter.com
  * Copyright © 2011 Manish Sinha manishsi...@ubuntu.com
+ * Copyright © 2012 Canonical Ltd.
+ * By Siegfried-A. Gevatter siegfried.gevat...@collabora.co.uk
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -262,15 +264,18 @@
 ANY = 2  // The event subjects may or may not be available
 }
 
-private bool check_field_match (string property,
-string template_property, bool is_symbol = false,
+private bool check_field_match (string? property,
+string? template_property, bool is_symbol = false,
 bool can_wildcard = false)
 {
 var matches = false;
+var is_negated = false;
 var parsed = template_property;
-var is_negated = Utils.parse_negation (ref parsed);
-
-if (parsed == )
+
+if (parsed != null)
+is_negated = Utils.parse_negation (ref parsed);
+
+if (Utils.is_empty_string (parsed))
 {
 return true;
 }
@@ -278,14 +283,15 @@
 {
 matches = true;
 }
-else if (is_symbol 
+else if (is_symbol  property != null 
 Symbol.get_all_parents (property).find_custom (parsed, strcmp) != null)
 {
 matches = true;
 }
 else if (can_wildcard  Utils.parse_wildcard (ref parsed))
 {
-if (property.has_prefix (parsed)) matches = true;
+if (property != null  property.has_prefix (parsed))
+matches = true;
 }
 
 return (is_negated) ? !matches : matches;
@@ -297,27 +303,27 @@
 
 public uint32id { get; set; }
 public int64 timestamp { get; set; }
-public stringorigin { get; set; }
+public string?   origin { get; set; }
 
-public string actor
+public string? actor
 {
 get { return _actor; }
-set { _actor = url_store.insert_const (value); }
+set { _actor = (value != null) ? url_store.insert_const (value) : null; }
 }
-public string interpretation
+public string? interpretation
 {
 get { return _interpretation; }
-set { _interpretation = url_store.insert_const (value); }
+set { _interpretation = (value != null) ? url_store.insert_const (value) : null; }
 }
-public string manifestation
+public string? manifestation
 {
 get { return _manifestation; }
-set { _manifestation = url_store.insert_const (value); }
+set { _manifestation = (value != null) ? url_store.insert_const (value) : null; }
 }
 
-private unowned string _actor;
-private unowned string _interpretation;
-private unowned string _manifestation;
+private unowned string? _actor;
+private unowned string? _interpretation;
+private unowned string? _manifestation;
 
 public GenericArraySubject subjects { get; set; }
 public ByteArray? payload { get; set; }
@@ -342,6 +348,29 @@
 subjects.add (subject);
 }
 
+// FIXME: change this to va_list once Vala bug #647097 is fixed
+public Event.full (string? interpretation=null,
+string? manifestation=null, string? actor=null,
+string? origin=null, GenericArraySubject? subjects=null)
+{
+this.interpretation = interpretation;
+this.manifestation = manifestation;
+this.actor = actor;
+this.origin = origin;
+
+if (subjects != null)
+this.subjects = subjects

[Zeitgeist] [Bug 771513] Re: File search should use Tracker when available

2012-02-15 Thread Siegfried Gevatter
** No longer affects: zeitgeist

-- 
You received this bug notification because you are a member of Zeitgeist
Extensions, which is the registrant for Zeitgeist Extensions.
https://bugs.launchpad.net/bugs/771513

Title:
  File search should use Tracker when available

Status in Meta-tracker:
  New
Status in Unity Files Lens:
  Opinion
Status in Zeitgeist Extensions:
  New

Bug description:
  This is a feature request, I guess.
  I think it's awkward that search inside Nautilus (that uses Tracker, if 
installed) finds 8 results for a certain query and the File Lense does not find 
anything (even when the string is in the filename!). Zeitgeist is not even 
supposed to be a search tool, so why are we pretending it is?

To manage notifications about this bug go to:
https://bugs.launchpad.net/tracker/+bug/771513/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 931136] Re: Write log output to ~/.cache/zeitgeist/

2012-02-15 Thread Siegfried Gevatter
 If zeitgeist writes blacklisted events to log too

By default they won't be logged since the priority of those messages is
DEBUG. However, you've raised a good point. We should probably chmod
0600 the log files too, just in case (and for consistency :)).

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/931136

Title:
  Write log output to ~/.cache/zeitgeist/

Status in Zeitgeist Framework:
  Confirmed

Bug description:
  Writing log output to a file is still missing from the Python version.
  We had a daily rotated file there.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/931136/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 930104] Re: Release checklist

2012-02-15 Thread Siegfried Gevatter
Moved the two remaining items to new bug #932989.

** Changed in: zeitgeist
   Status: Triaged = Fix Released

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/930104

Title:
  Release checklist

Status in Zeitgeist Framework:
  Fix Released

Bug description:
  There are some outstanding issues we need to tackle before releasing
  stable 0.9.0:

   * Important: the TableLookup in FTS can currently explode. The new
  schema version needs to add AUTOINCREMENT to the `id' row of all
  tables in TableLookup. We should do this before releasing a new
  tarball.

   * TableLookup.get_value: please prepare the query in the constructor.

   * Configure isn't checking for xapian being there

   * Add a flag to disable FTS? (keeping the Xapian dependency
  avoidable)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/930104/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~rainct/zeitgeist/custom-log-handler into lp:zeitgeist

2012-02-15 Thread Siegfried Gevatter
Siegfried Gevatter has proposed merging lp:~rainct/zeitgeist/custom-log-handler 
into lp:zeitgeist with lp:~rainct/zeitgeist/matches-template as a prerequisite.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)

For more details, see:
https://code.launchpad.net/~rainct/zeitgeist/custom-log-handler/+merge/93289
-- 
https://code.launchpad.net/~rainct/zeitgeist/custom-log-handler/+merge/93289
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~rainct/zeitgeist/custom-log-handler into lp:zeitgeist.
=== modified file 'src/Makefile.am'
--- src/Makefile.am	2012-02-02 18:57:35 +
+++ src/Makefile.am	2012-02-15 19:59:18 +
@@ -37,6 +37,7 @@
 	extension.vala \
 	extension-collection.vala \
 	extension-store.vala \
+	logging.vala \
 	notify.vala \
 	sql.vala \
 	utils.vala \

=== added file 'src/logging.vala'
--- src/logging.vala	1970-01-01 00:00:00 +
+++ src/logging.vala	2012-02-15 19:59:18 +
@@ -0,0 +1,106 @@
+/* logging.vala
+ *
+ * Copyright © 2012 Canonical Ltd.
+ * By Siegfried-A. Gevatter siegfried.gevat...@collabora.co.uk
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see http://www.gnu.org/licenses/.
+ *
+ */
+
+namespace Zeitgeist
+{
+namespace Logging
+{
+
+private string get_log_level_string (LogLevelFlags log_levels)
+{
+string log_level;
+
+if ((log_levels  LogLevelFlags.LEVEL_ERROR) != 0)
+log_level = ERROR;
+else if ((log_levels  LogLevelFlags.LEVEL_CRITICAL) != 0)
+log_level = CRITICAL;
+else if ((log_levels  LogLevelFlags.LEVEL_WARNING) != 0)
+log_level = WARNING;
+else if ((log_levels  LogLevelFlags.LEVEL_MESSAGE) != 0)
+log_level = MESSAGE;
+else if ((log_levels  LogLevelFlags.LEVEL_INFO) != 0)
+log_level = INFO;
+else if ((log_levels  LogLevelFlags.LEVEL_DEBUG) != 0)
+log_level = DEBUG;
+else
+log_level = UNKNOWN;
+
+return log_level;
+}
+
+private void log_handler (string? log_domain, LogLevelFlags log_levels,
+string message)
+{
+string log_level = get_log_level_string (log_levels);
+//string timestamp = new DateTime.now_local ().format (
+//%Y-%m-%d %H:%M:%S);
+// FIXME: get PID
+
+unowned FileStream output;
+if ((log_levels  LogLevelFlags.LEVEL_DEBUG) != 0)
+output = stdout;
+else
+output = stderr;
+output.printf (** %s: %s\n, log_level, message);
+
+// FIXME: log to file
+//printf ([%s] - %s - %s\n, timestamp, log_level, message);
+}
+
+public void setup_logging (string? log_level)
+{
+LogLevelFlags discarded = LogLevelFlags.LEVEL_DEBUG;
+if (log_level != null)
+{
+var ld = LogLevelFlags.LEVEL_DEBUG;
+var li = LogLevelFlags.LEVEL_INFO;
+var lm = LogLevelFlags.LEVEL_MESSAGE;
+var lw = LogLevelFlags.LEVEL_WARNING;
+var lc = LogLevelFlags.LEVEL_CRITICAL;
+switch (log_level.up ())
+{
+case DEBUG:
+discarded = 0;
+break;
+case INFO:
+discarded = ld;
+break;
+case WARNING:
+discarded = ld | li | lm;
+break;
+case CRITICAL:
+discarded = ld | li | lm | lw;
+break;
+case ERROR:
+discarded = ld | li | lm | lw | lc;
+break;
+}
+}
+if (discarded != 0)
+Log.set_handler (null, discarded, () = {});
+
+LogLevelFlags logged = ~discarded  ~LogLevelFlags.FLAG_RECURSION;
+Log.set_handler (null, logged, log_handler);
+}
+
+}
+}
+
+// vim:expandtab:ts=4:sw=4

=== modified file 'src/zeitgeist-daemon.vala'
--- src/zeitgeist-daemon.vala	2012-02-07 12:46:46 +
+++ src/zeitgeist-daemon.vala	2012-02-15 19:59:18 +

Re: [Zeitgeist] [Merge] lp:~rainct/zeitgeist/matches-template into lp:zeitgeist

2012-02-17 Thread Siegfried Gevatter
2012/2/17 Michal Hruby michal.hr...@canonical.com:
 This is very close to public API, I'd prefer this didn't change, so if we 
 want a variant with a PtrArray, let's call it something else (for example 
 full_from_ptrarray)

I don't want PtrArray, it's just a workaround since Vala is br0ken.

 328     +    // FIXME: figure out how we want to treat multiple subjects in 
 the template
 Same way engine does, ie AND them within one event.

Yeah, that's not what I mean, but rather: if there's two empty
subjects, does that mean anything (ie. I want events with exactly two
subject) or are they just ignored? But I retract the question, the
former would just be confusing.

-- 
https://code.launchpad.net/~rainct/zeitgeist/matches-template/+merge/93279
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~rainct/zeitgeist/custom-log-handler into lp:zeitgeist

2012-02-17 Thread Siegfried Gevatter
2012/2/17 Michal Hruby michal.hr...@canonical.com:
 Only WARNING and higher levels should be logged to stderr.

Currently it's sending anything but debug to stderr. I tried :P.

(But if you want to change that, fine with me).

 Also, one thing I dont like about glib's default log handler is that
 it doesn't print time, could we do that?

To the file, sure (it's in the commented code).

To std{out,err}, wth would you do that, it's just cluttering stuff up.
-- 
https://code.launchpad.net/~rainct/zeitgeist/custom-log-handler/+merge/93289
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 778140] Re: Time warp problem in MOVE_EVENT handling

2012-02-18 Thread Siegfried Gevatter
** Description changed:

+ MOVE EVENTS
+ 
  
- RainCT seiflotfy: the query updating current_uri on MOVE_EVENT should only 
change stuff with timestampmove_event_timestamp
- seiflotfy RainCT, true
- seiflotfy good catch
- RainCT seiflotfy: there's also another ugly case
- seiflotfy RainCT, do tell
- RainCT seiflotfy: Imagine you insert event: 0. A, 1. A, 2. A, 3. B, 4. C, 
5. A. Then with timestamp between events 3 and 4 you get A-T, so now you have 
T, T, T, B, C, A
- [...]
- seiflotfy i see the problem
- seiflotfy the last A should be a T
- RainCT no, the last A is fine
- RainCT because it is a new file with the same name
- [...]
- seiflotfy yeah ok
- RainCT seiflotfy: now you get A-L with timestamp between 1 and 2, so it 
should have L, L, T, B, C, A, but since the current_uri of the first is 
already L you won't see it. for this it'd need to check the original URI 
instead of the current_uri
- RainCT are you with me so far?
- seiflotfy trying to
- seiflotfy RainCT, ok i cont get your last point
- seiflotfy A-L wont change the T
- seiflotfy because A has been move to T
- seiflotfy you can not move A again
- seiflotfy you need to move T
- seiflotfy thus its does not work
- RainCT yeah, but it should, because you're being told that it was moved 
before that
- seiflotfy unless you really want to you will have to look for all 
MOVE_EVENTS with A and figure out what A is now
- seiflotfy its doable
- RainCT so the move that happened later in time didn't affect those events, 
only the later ones
- seiflotfy RainCT, true
- RainCT the easy way to solve this is checking subj_id instead of 
subj_id_current
- seiflotfy RainCT, i think we should raise an exception
- RainCT but now when it gets really messed up is if there was even another 
move event before that
- RainCT which was already logged
- seiflotfy You tried to move and event after it was used in a new location
- seiflotfy RainCT, actually we also have the MOVE_EVENT logged
- seiflotfy you can then try to figrue out the patch of A
- RainCT yes, that's the solution
- seiflotfy the path
- seiflotfy RainCT, but i highly discourage that
- RainCT you can find the previos move event and set 
timestampprevious_move_event.timestamp
- seiflotfy RainCT, exactly
- seiflotfy i am +- 0 on that tbh
- seiflotfy not sure
- RainCT ok, I don't dislike finding the previous timestamp
- RainCT i'll open a bug
+ PRESENTATION
+ 
+ By definition, Zeitgeist's events are immutable, and the subject meta-data
+ they contain is a snapshot of how a given resource was back when the event
+ happened.
+ 
+ To be useful, some way of linking event subjects to their physical
+ representation is needed. The primary identifier for doing this is the
+ subject's URI.
+ 
+ However, URIs, especially local ones, are transient and may change. To solve
+ this problem, a new field was added to subjects, and it is special in that
+ it isn't considered to be immutable. This is the `current_uri' field.
+ 
+ INITIAL IDEA
+ 
+ When a subject is inserted, its `current_uri' field is initially set to the
+ same value as its `uri' field. When Zeitgeist receives a MOVE_EVENT for that
+ file (with a coherent timestamp), the value of `current_uri' is updated to
+ its new file name.
+ 
+ The idea here is that this is done in a way that, if we deleted the
+ `current_uri' of all subjects and restored them looking at all MOVE_EVENTs
+ in the database, the result would be the same as before.
+ 
+ CURRENT IMPLEMENTATION
+ 
+ As of now, `current_uri' is initially set to the same value as `current_uri'.
+ Once a MOVE_EVENT is inserted, all events with a timestamp before that of the
+ move are updated.
+ 
+ However, after the point the MOVE_EVENT has been inserted, it is never
+ considered again. This is so for performance reasons, since the initial plan
+ would require pretty much rebuilding the database.
+ 
+ PROBLEMS
+ 
+ There are numerous problems with this implementation, at least in theoretical
+ situations.
+ 
+ One problem is that of events coming in after the MOVE_EVENT (maybe because
+ the application is batching them). In this case they won't be updated.
+ 
+ We also have the opposite problem, a MOVE_EVENT coming in late after another
+ conflicting MOVE_EVENT happened. For instance, we have the following events:
+   T5 a.txt, T10 a.txt, T15 a.txt
+ We receive a first MOVE_EVENT from a.txt to b.txt with timestamp T7. Now we
+ have (time / current_uri):
+   T5 a.txt, T10 b.txt, T15 b.txt
+ Finally, we receive a further MOVE_EVENT from a.txt to c.txt with timestamp 
T0.
+ The result is:
+   T5 c.txt, T10 b.txt, T15 b.txt
+ This is totally inconsistent; the correct result would have been:
+   T5 c.txt, T10 c.txt, T15 b.txt
+ 
+ Further, even if implemented as described in the initial idea section, the
+ concept is flawed in that it may happen that events are inserted
+ retrospectively using already their updated URI. This could give rise to
+ further inconsistencies.
+ 
+ 

Re: [Zeitgeist] [Bug 940907] [NEW] Don't log *.part files in Downloads folder

2012-02-25 Thread Siegfried Gevatter
Hi Omar,

Nice catch, I agree b) would make sense.

Michal, what do you think?

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is the registrant for Zeitgeist Datahub.
https://bugs.launchpad.net/bugs/940907

Title:
  Don't log *.part files in Downloads folder

Status in Zeitgeist Datahub:
  New

Bug description:
  Hello:

  I really like Downloads folder being monitored, really handy! The problem is 
that FF
  creates a *.part file until the download is finished, so in the end you get 
two files in the DB, yet
  the *.part one has ceased to exist and is redundant.

  I'll humbly recommend:

  a) Just keep the $filename*.part file in DB until $filename appears/is 
complete, which I guess
  can be a PITA since you'll have to do checks and DB deletions.

  b) Don't log *.part files at all. Since most cannot be opened anyway, being 
incomplete files, 
  I don't think not-logging *.part files will be a loss.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist-datahub/+bug/940907/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 940907] Re: Don't log *.part files in Downloads folder

2012-02-27 Thread Siegfried Gevatter
** Changed in: zeitgeist-datahub
   Status: Confirmed = Fix Committed

** Changed in: zeitgeist-datahub
 Assignee: (unassigned) = Siegfried Gevatter (rainct)

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is the registrant for Zeitgeist Datahub.
https://bugs.launchpad.net/bugs/940907

Title:
  Don't log *.part files in Downloads folder

Status in Zeitgeist Datahub:
  Fix Committed

Bug description:
  Hello:

  I really like Downloads folder being monitored, really handy! The problem is 
that FF
  creates a *.part file until the download is finished, so in the end you get 
two files in the DB, yet
  the *.part one has ceased to exist and is redundant.

  I'll humbly recommend:

  a) Just keep the $filename*.part file in DB until $filename appears/is 
complete, which I guess
  can be a PITA since you'll have to do checks and DB deletions.

  b) Don't log *.part files at all. Since most cannot be opened anyway, being 
incomplete files, 
  I don't think not-logging *.part files will be a loss.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist-datahub/+bug/940907/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 928811] Re: Bluebird: no test cases for Event.matches_template

2012-02-29 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Status: In Progress = Fix Released

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/928811

Title:
  Bluebird: no test cases for Event.matches_template

Status in Zeitgeist Framework:
  Fix Released

Bug description:
  Please write some ^^

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/928811/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 933200] Re: zeitgeist-fts crashed with SIGSEGV in g_str_hash()

2012-03-01 Thread Siegfried Gevatter
*** This bug is a duplicate of bug 941530 ***
https://bugs.launchpad.net/bugs/941530

** This bug has been marked a duplicate of bug 941530
   zeitgeist-daemon crashed with SIGSEGV in g_str_hash()

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/933200

Title:
  zeitgeist-fts crashed with SIGSEGV in g_str_hash()

Status in Zeitgeist Framework:
  New
Status in “zeitgeist” package in Ubuntu:
  Confirmed

Bug description:
   I don't know

  ProblemType: Crash
  DistroRelease: Ubuntu 12.04
  Package: zeitgeist-core 0.8.99~alpha3-1
  ProcVersionSignature: Ubuntu 3.2.0-15.24-generic 3.2.5
  Uname: Linux 3.2.0-15-generic i686
  ApportVersion: 1.91-0ubuntu1
  Architecture: i386
  Date: Thu Feb 16 09:19:48 2012
  ExecutablePath: /usr/lib/zeitgeist/zeitgeist-fts
  InstallationMedia: Ubuntu 12.04 LTS Precise Pangolin - Alpha i386 
(2029.1)
  ProcCmdline: /usr/lib/zeitgeist/zeitgeist-fts
  SegvAnalysis:
   Segfault happened at: 0x2c3c1a g_str_hash+10:  movzbl (%ecx),%edx
   PC (0x002c3c1a) ok
   source (%ecx) (0x) not located in a known VMA region (needed 
readable region)!
   destination %edx ok
  SegvReason: reading NULL VMA
  Signal: 11
  SourcePackage: zeitgeist
  StacktraceTop:
   g_str_hash () from /lib/i386-linux-gnu/libglib-2.0.so.0
   g_hash_table_lookup () from /lib/i386-linux-gnu/libglib-2.0.so.0
   g_string_chunk_insert_const () from /lib/i386-linux-gnu/libglib-2.0.so.0
   ?? ()
   ?? ()
  Title: zeitgeist-fts crashed with SIGSEGV in g_str_hash()
  UpgradeStatus: Upgraded to precise on 2012-02-16 (0 days ago)
  UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/933200/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~rainct/zeitgeist/collapse-uri into lp:zeitgeist

2012-03-05 Thread Siegfried Gevatter
Siegfried Gevatter has proposed merging lp:~rainct/zeitgeist/collapse-uri into 
lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)

For more details, see:
https://code.launchpad.net/~rainct/zeitgeist/collapse-uri/+merge/95994
-- 
https://code.launchpad.net/~rainct/zeitgeist/collapse-uri/+merge/95994
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~rainct/zeitgeist/collapse-uri into lp:zeitgeist.
=== modified file 'extensions/fts++/indexer.cpp'
--- extensions/fts++/indexer.cpp	2012-02-14 16:56:04 +
+++ extensions/fts++/indexer.cpp	2012-03-05 20:44:22 +
@@ -23,6 +23,7 @@
 #include xapian.h
 #include queue
 #include vector
+#include cassert
 
 #include gio/gio.h
 #include gio/gdesktopappinfo.h
@@ -42,6 +43,7 @@
 
 const Xapian::valueno VALUE_EVENT_ID = 0;
 const Xapian::valueno VALUE_TIMESTAMP = 1;
+const Xapian::valueno VALUE_URI_HASH = 2;
 
 #define QUERY_PARSER_FLAGS \
   Xapian::QueryParser::FLAG_PHRASE | Xapian::QueryParser::FLAG_BOOLEAN | \
@@ -100,6 +102,11 @@
 this-query_parser-set_database (*this-db);
 
 this-enquire = new Xapian::Enquire (*this-db);
+
+assert (g_checksum_type_get_length (G_CHECKSUM_MD5) == 16);
+this-checksum = g_checksum_new (G_CHECKSUM_MD5);
+if (!this-checksum)
+g_critical (GChecksum initialization failed.);
 
   }
   catch (const Xapian::Error xp_error)
@@ -727,7 +734,11 @@
 guint maxhits;
 if (result_type == 100 ||
 result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_EVENTS ||
-result_type == ZEITGEIST_RESULT_TYPE_LEAST_RECENT_EVENTS)
+result_type == ZEITGEIST_RESULT_TYPE_LEAST_RECENT_EVENTS ||
+result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_SUBJECTS ||
+result_type == ZEITGEIST_RESULT_TYPE_LEAST_RECENT_SUBJECTS ||
+result_type == ZEITGEIST_RESULT_TYPE_MOST_POPULAR_SUBJECTS ||
+result_type == ZEITGEIST_RESULT_TYPE_LEAST_POPULAR_SUBJECTS)
 {
   maxhits = count;
 }
@@ -745,6 +756,14 @@
   enquire-set_sort_by_value (VALUE_TIMESTAMP, true);
 }
 
+if (result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_SUBJECTS ||
+result_type == ZEITGEIST_RESULT_TYPE_LEAST_RECENT_SUBJECTS ||
+result_type == ZEITGEIST_RESULT_TYPE_MOST_POPULAR_SUBJECTS ||
+result_type == ZEITGEIST_RESULT_TYPE_LEAST_POPULAR_SUBJECTS)
+{
+enquire-set_collapse_key (VALUE_URI_HASH);
+}
+
 Xapian::Query q(query_parser-parse_query (query_string, QUERY_PARSER_FLAGS));
 enquire-set_query (q);
 Xapian::MSet hits (enquire-get_mset (offset, maxhits));
@@ -988,6 +1007,19 @@
 return; // ignore this event completely...
   }
 
+  // We need the subject URI so we can use Xapian's collapse key feature
+  // for *_SUBJECT grouping. However, to save space, we'll just save a hash.
+  // A better option would be using URI's id, but for that we'd need a SQL
+  // query that'd be subject to races.
+  // FIXME(?): This doesn't work for events with multiple subjects.
+  g_checksum_update (checksum, (guchar *) uri.c_str (), -1);
+  guint8 uri_hash[17];
+  gsize hash_size = 16;
+  g_checksum_get_digest (checksum, uri_hash, hash_size);
+  assert (hash_size == 16);
+  doc.add_value (VALUE_URI_HASH, std::string((char *) uri_hash, 16));
+  g_checksum_reset (checksum);
+
   val = zeitgeist_subject_get_text (subject);
   if (val  val[0] != '\0')
   {

=== modified file 'extensions/fts++/indexer.h'
--- extensions/fts++/indexer.h	2012-02-14 16:56:04 +
+++ extensions/fts++/indexer.h	2012-03-05 20:44:22 +
@@ -21,6 +21,7 @@
 #define _ZGFTS_INDEXER_H_
 
 #include glib-object.h
+#include glib/gchecksum.h
 #include gio/gio.h
 #include xapian.h
 
@@ -42,6 +43,7 @@
 , query_parser (NULL)
 , enquire (NULL)
 , tokenizer (NULL)
+, checksum (NULL)
 , clear_failed_id (0)
   {
 const gchar *home_dir = g_get_home_dir ();
@@ -54,6 +56,7 @@
 if (enquire) delete enquire;
 if (query_parser) delete query_parser;
 if (db) delete db;
+if (checksum) { g_checksum_free (checksum); checksum = NULL; }
 
 for (AppInfoMap::iterator it = app_info_cache.begin ();
  it != app_info_cache.end (); ++it)
@@ -120,6 +123,7 @@
   Xapian::TermGenerator*tokenizer;
   AppInfoMapapp_info_cache;
   ApplicationSetfailed_lookups;
+  GChecksum *checksum;
 
   guint clear_failed_id;
   std::string   home_dir_path;

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 926652] Re: security/privacy hole in zeitgeist

2012-03-08 Thread Siegfried Gevatter
** Changed in: zeitgeist (Ubuntu)
   Status: Confirmed = Fix Released

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/926652

Title:
  security/privacy hole in zeitgeist

Status in Zeitgeist Framework:
  Fix Released
Status in “zeitgeist” package in Ubuntu:
  Fix Released

Bug description:
  zeitgeist data files don't seem to use the write permissions by
  default:

  user@machine:~/.local/share/zeitgeist$ ls -l
  total 7244
  -rw-r--r-- 1 user user 3776512 2012-02-03 23:47 activity.sqlite
  -rw-rw-r-- 1 user user 1996800 2011-10-17 03:09 activity.sqlite.bck
  -rw-r--r-- 1 user user 1623848 2012-02-03 23:47 activity.sqlite-journal

  so that any user on the same machine (or with network access to the
  home drive), including the guest user, will be able to read the highly
  sensitive private information of everybody else and use it to
  blackmail the users, or whatever nasty things one could do with
  private information.

  this could be fixed by having the right permissions or even better by
  making all the privacy-killing features of ubuntu opt in...

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/926652/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~mhr3/zeitgeist/fts-secondary-sorting into lp:zeitgeist

2012-03-08 Thread Siegfried Gevatter
As discussed on IRC, I don't really like how this is ending up. We should look 
into re-architecting FTS at some point, starting from the assumption that it's 
only for searching current documents (so it may change from storing all events 
to storing one of each subjects + event information, or whatever). But since 
this stuff is supposed to be working in Precise, I guess it's fine to go with 
the workaround for now.

The main problem I see with the MP right now is that it's just looking at the 
URI when re-requesting the events, so if the request was for something 
particular (especially event interpretation, event manifestation or actor, 
since the subject data could be seen as somewhat more constant) it's likely to 
end up giving a wrong sort of event.

A possible way of fixing this would be merging the uri templates with the 
request templates (the ones used in CompileEventFilterQuery). The trivial 
implementation would go something like:

tmpls = []
for template in templates:
  for uri in uris:
tmpl = copy(template)
tmpl.subject_uri = ...
tmpls.append(tmpl)

However, it may end up generating really big SQL queries (eg. consider just two 
templates for subject_interpretation={Music,Video} and a limit of 100 events; 
that becomes 200 templates with subject_interpretation and 
subject_manifestation, which is 400 conditions in the generated SQL).
-- 
https://code.launchpad.net/~mhr3/zeitgeist/fts-secondary-sorting/+merge/96479
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~mhr3/zeitgeist/fts-secondary-sorting into lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 948794] Re: Current URI field not used

2012-03-13 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Importance: Undecided = High

** Changed in: zeitgeist
   Status: New = In Progress

** Changed in: zeitgeist
Milestone: None = 0.9.0

** Changed in: zeitgeist
 Assignee: (unassigned) = Siegfried Gevatter (rainct)

** Summary changed:

- Current URI field not used
+ Current URI field not used (FTS)

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/948794

Title:
  Current URI field not used (FTS)

Status in Zeitgeist Framework:
  In Progress

Bug description:
  Keeping this as a master bug to remind us that we should be using the
  current uri field in many places now that there's actually something
  pushing MOVE_EVENTs to Zeitgeist. First place to fix would be FTS.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/948794/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 953041] Re: Extraneous actors are inserted into sqlite database during read-only operations

2012-03-13 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Importance: Undecided = High

** Changed in: zeitgeist
Milestone: None = 0.9.0

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/953041

Title:
  Extraneous actors are inserted into sqlite database during read-only
  operations

Status in Zeitgeist Framework:
  New

Bug description:
  Example code:

  import time, os
  from gi.repository import GObject
  from zeitgeist.client import ZeitgeistClient
  from zeitgeist.datamodel import Event, Subject, Interpretation
  zg = ZeitgeistClient()

  event_template = Event()
  event_template.actor = foo

  mainloop = GObject.MainLoop()

  def callback(events):
  print len(events)
  mainloop.quit()

  zg.find_events_for_templates([event_template], callback, num_events=100, 
result_type=0)
  mainloop.run()

  Searching the actors table in sqlite shows a foo actor after
  execution.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/953041/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 954206] [NEW] Improved DELETE_EVENT handling

2012-03-13 Thread Siegfried Gevatter
Public bug reported:

DELETE EVENTS


PRESENTATION

When it comes to handling the deletion of files (local or remote
-FTP/SSH/etc-), Zeitgeist supports the logging of DELETE_EVENTs, but
that's about it.

There's no clear distinction between what exists and what doesn't. The
addition of the current_uri field made this worse, since if a file X is
deleted and at some later point a new file is created with the same name
they will be considered the same.

PROPOSAL

I propose two measures that should give us some pretty reasonable
handling of deletions:

a) Extend the StorageMonitor extension with a concept of deleted
resource. Insertion of DELETE_EVENTs (for local files, and possible
ftp/sftp/etc) will update the value of storage where appropriate so
the deleted events will be filtered out when querying with
StorageState.AVAILABLE.

b) In the engine itself, process DELETE_EVENTs by updating the
current_uri of relevant subjects. The new URI will take a form like
deleted://%d where %d is an identifier unique for each deletion
(incremental integer, most likely).

RANDOM (UNRELATED) THOUGHTS

 * This just made me think, would it make sense to add a new resource
table for data shared between subjects (ie. current_uri and storage)?

 * Also, would a current_origin field be useful?

** Affects: zeitgeist
 Importance: Medium
 Status: New

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/954206

Title:
  Improved DELETE_EVENT handling

Status in Zeitgeist Framework:
  New

Bug description:
  DELETE EVENTS
  

  PRESENTATION

  When it comes to handling the deletion of files (local or remote
  -FTP/SSH/etc-), Zeitgeist supports the logging of DELETE_EVENTs, but
  that's about it.

  There's no clear distinction between what exists and what doesn't. The
  addition of the current_uri field made this worse, since if a file X
  is deleted and at some later point a new file is created with the same
  name they will be considered the same.

  PROPOSAL

  I propose two measures that should give us some pretty reasonable
  handling of deletions:

  a) Extend the StorageMonitor extension with a concept of deleted
  resource. Insertion of DELETE_EVENTs (for local files, and possible
  ftp/sftp/etc) will update the value of storage where appropriate so
  the deleted events will be filtered out when querying with
  StorageState.AVAILABLE.

  b) In the engine itself, process DELETE_EVENTs by updating the
  current_uri of relevant subjects. The new URI will take a form like
  deleted://%d where %d is an identifier unique for each deletion
  (incremental integer, most likely).

  RANDOM (UNRELATED) THOUGHTS

   * This just made me think, would it make sense to add a new
  resource table for data shared between subjects (ie. current_uri and
  storage)?

   * Also, would a current_origin field be useful?

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/954206/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 954206] Re: Improved DELETE_EVENT handling

2012-03-13 Thread Siegfried Gevatter
** Description changed:

  DELETE EVENTS
  
  
  PRESENTATION
  
  When it comes to handling the deletion of files (local or remote
  -FTP/SSH/etc-), Zeitgeist supports the logging of DELETE_EVENTs, but
  that's about it.
  
  There's no clear distinction between what exists and what doesn't. The
  addition of the current_uri field made this worse, since if a file X is
  deleted and at some later point a new file is created with the same name
  they will be considered the same.
  
  PROPOSAL
  
  I propose two measures that should give us some pretty reasonable
  handling of deletions:
  
  a) Extend the StorageMonitor extension with a concept of deleted
  resource. Insertion of DELETE_EVENTs (for local files, and possible
  ftp/sftp/etc) will update the value of storage where appropriate so
  the deleted events will be filtered out when querying with
  StorageState.AVAILABLE.
  
  b) In the engine itself, process DELETE_EVENTs by updating the
  current_uri of relevant subjects. The new URI will take a form like
  deleted://%d where %d is an identifier unique for each deletion
  (incremental integer, most likely).
  
- 
  RANDOM (UNRELATED) THOUGHTS
  
-  * This just made me think, would it make sense to add a new resource
+  * This just made me think, would it make sense to add a new resource
  table for data shared between subjects (ie. current_uri and storage)?
  
-  * Also, would a current_origin field be useful=
+  * Also, would a current_origin field be useful?

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/954206

Title:
  Improved DELETE_EVENT handling

Status in Zeitgeist Framework:
  New

Bug description:
  DELETE EVENTS
  

  PRESENTATION

  When it comes to handling the deletion of files (local or remote
  -FTP/SSH/etc-), Zeitgeist supports the logging of DELETE_EVENTs, but
  that's about it.

  There's no clear distinction between what exists and what doesn't. The
  addition of the current_uri field made this worse, since if a file X
  is deleted and at some later point a new file is created with the same
  name they will be considered the same.

  PROPOSAL

  I propose two measures that should give us some pretty reasonable
  handling of deletions:

  a) Extend the StorageMonitor extension with a concept of deleted
  resource. Insertion of DELETE_EVENTs (for local files, and possible
  ftp/sftp/etc) will update the value of storage where appropriate so
  the deleted events will be filtered out when querying with
  StorageState.AVAILABLE.

  b) In the engine itself, process DELETE_EVENTs by updating the
  current_uri of relevant subjects. The new URI will take a form like
  deleted://%d where %d is an identifier unique for each deletion
  (incremental integer, most likely).

  RANDOM (UNRELATED) THOUGHTS

   * This just made me think, would it make sense to add a new
  resource table for data shared between subjects (ie. current_uri and
  storage)?

   * Also, would a current_origin field be useful?

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/954206/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~tdfischer/zeitgeist/common-where into lp:zeitgeist

2012-03-13 Thread Siegfried Gevatter
Review: Approve


-- 
https://code.launchpad.net/~tdfischer/zeitgeist/common-where/+merge/97270
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~tdfischer/zeitgeist/common-where into lp:zeitgeist

2012-03-13 Thread Siegfried Gevatter
The proposal to merge lp:~tdfischer/zeitgeist/common-where into lp:zeitgeist 
has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~tdfischer/zeitgeist/common-where/+merge/97270
-- 
https://code.launchpad.net/~tdfischer/zeitgeist/common-where/+merge/97270
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~tdfischer/zeitgeist/bluebird into lp:zeitgeist

2012-03-13 Thread Siegfried Gevatter
Hm, personally I'd prefer a bool create=false parameter in get_id. Having 
get_ and find_ is kinda confusing (esp. with get_ inserting stuff :p).
-- 
https://code.launchpad.net/~tdfischer/zeitgeist/bluebird/+merge/97026
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~tdfischer/zeitgeist/bluebird into lp:zeitgeist

2012-03-13 Thread Siegfried Gevatter
Not a problem, everything in lp:zeitgeist is private API so far :).
-- 
https://code.launchpad.net/~tdfischer/zeitgeist/bluebird/+merge/97026
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~tdfischer/zeitgeist/bluebird into lp:zeitgeist

2012-03-13 Thread Siegfried Gevatter
2012/3/13 Seif Lotfy s...@lotfy.com:
 but he has a point there since we did want to set up libzg 2 based on the
 internals of zeitgeist

Yes, so it's time to get nice clean APIs before stuff gets exposed.
But anyway, TableLookup is still then just internal API.

-- 
https://code.launchpad.net/~tdfischer/zeitgeist/bluebird/+merge/97026
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~rainct/zeitgeist/fts-current-uri into lp:zeitgeist

2012-03-15 Thread Siegfried Gevatter
Siegfried Gevatter has proposed merging lp:~rainct/zeitgeist/fts-current-uri 
into lp:zeitgeist.

Requested reviews:
  Michal Hruby (mhr3)

For more details, see:
https://code.launchpad.net/~rainct/zeitgeist/fts-current-uri/+merge/97655
-- 
https://code.launchpad.net/~rainct/zeitgeist/fts-current-uri/+merge/97655
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.
=== modified file 'extensions/fts++/indexer.cpp'
--- extensions/fts++/indexer.cpp	2012-03-14 12:31:51 +
+++ extensions/fts++/indexer.cpp	2012-03-15 13:47:33 +
@@ -1259,7 +1259,6 @@
 {
   try
   {
-// FIXME: we need to special case MOVE_EVENTs
 const gchar *val;
 guint event_id = zeitgeist_event_get_id (event);
 g_return_if_fail (event_id  0);
@@ -1288,7 +1287,13 @@
   ZeitgeistSubject *subject;
   subject = (ZeitgeistSubject*) g_ptr_array_index (subjects, i);
 
-  val = zeitgeist_subject_get_uri (subject);
+  // We use current_uri (vs. uri) where since we care about real stuff,
+  // not whatever happened some time ago.
+  //
+  // This will most likely still be the same as URI (unless something
+  // triggers a reindexation of the DB), but at least MOVE_EVENTS
+  // will have the updated URI.
+  val = zeitgeist_subject_get_current_uri (subject);
   if (val == NULL || val[0] == '\0') continue;
 
   std::string uri(val);

=== modified file 'extensions/fts++/test/test-indexer.cpp'
--- extensions/fts++/test/test-indexer.cpp	2012-03-14 15:47:20 +
+++ extensions/fts++/test/test-indexer.cpp	2012-03-15 13:47:33 +
@@ -203,6 +203,27 @@
   return event;
 }
 
+static ZeitgeistEvent* create_test_event8 (void)
+{
+  ZeitgeistEvent *event = zeitgeist_event_new ();
+  ZeitgeistSubject *subject = zeitgeist_subject_new ();
+  
+  zeitgeist_subject_set_interpretation (subject, ZEITGEIST_NFO_PRESENTATION);
+  zeitgeist_subject_set_manifestation (subject, ZEITGEIST_NFO_FILE_DATA_OBJECT);
+  zeitgeist_subject_set_uri (subject, file:///home/username/Documents/my_fabulous_presentation.pdf);
+  zeitgeist_subject_set_current_uri (subject, file:///home/username/Awesome.pdf);
+  zeitgeist_subject_set_text (subject, NULL);
+  zeitgeist_subject_set_mimetype (subject, application/pdf);
+
+  zeitgeist_event_set_interpretation (event, ZEITGEIST_ZG_MOVE_EVENT);
+  zeitgeist_event_set_manifestation (event, ZEITGEIST_ZG_USER_ACTIVITY);
+  zeitgeist_event_set_actor (event, application://nautilus.desktop);
+  zeitgeist_event_add_subject (event, subject);
+
+  g_object_unref (subject);
+  return event;
+}
+
 // Steals the event, ref it if you want to keep it
 static guint
 index_event (Fixture *fix, ZeitgeistEvent *event)
@@ -838,6 +859,36 @@
   zeitgeist_event_get_id ((ZeitgeistEvent*) results-pdata[0]));
 }
 
+static void
+test_simple_move_event (Fixture *fix, gconstpointer data)
+{
+  guint matches;
+  guint event_id;
+  ZeitgeistEvent* event;
+ 
+  // add test events to DBs
+  index_event (fix, create_test_event1 ());
+  index_event (fix, create_test_event4 ());
+  event_id = index_event (fix, create_test_event8 ());
+
+  GPtrArray *results =
+zeitgeist_indexer_search (fix-indexer,
+  awesome,
+  zeitgeist_time_range_new_anytime (),
+  g_ptr_array_new (),
+  0,
+  10,
+  ZEITGEIST_RESULT_TYPE_MOST_RECENT_EVENTS,
+  matches,
+  NULL);
+
+  g_assert_cmpuint (matches, , 0);
+  g_assert_cmpuint (results-len, ==, 1);
+
+  event = (ZeitgeistEvent*) results-pdata[0];
+  g_assert_cmpuint (zeitgeist_event_get_id (event), ==, event_id);
+}
+
 G_BEGIN_DECLS
 
 static void discard_message (const gchar *domain,
@@ -881,6 +932,8 @@
   setup, test_simple_relevancies_query, teardown);
   g_test_add (/Zeitgeist/FTS/Indexer/RelevanciesSubject, Fixture, 0,
   setup, test_simple_relevancies_subject_query, teardown);
+  g_test_add (/Zeitgeist/FTS/Indexer/MoveEvent, Fixture, 0,
+  setup, test_simple_move_event, teardown);
 
   // get rid of the rebuilding index... messages
   g_log_set_handler (NULL, G_LOG_LEVEL_MESSAGE, discard_message, NULL);

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~rainct/zeitgeist/fts-current-uri into lp:zeitgeist

2012-03-15 Thread Siegfried Gevatter
Outstanding issue: Should CompileEventFilterQuery also be changed to use 
current_uri instead (or in addition to?) uri?
-- 
https://code.launchpad.net/~rainct/zeitgeist/fts-current-uri/+merge/97655
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~rainct/zeitgeist/fts-sorting into lp:zeitgeist

2012-03-16 Thread Siegfried Gevatter
Siegfried Gevatter has proposed merging lp:~rainct/zeitgeist/fts-sorting into 
lp:zeitgeist.

Requested reviews:
  Michal Hruby (mhr3)

For more details, see:
https://code.launchpad.net/~rainct/zeitgeist/fts-sorting/+merge/97985
-- 
https://code.launchpad.net/~rainct/zeitgeist/fts-sorting/+merge/97985
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.
=== modified file 'extensions/fts++/indexer.cpp'
--- extensions/fts++/indexer.cpp	2012-03-16 20:03:05 +
+++ extensions/fts++/indexer.cpp	2012-03-16 20:45:24 +
@@ -778,7 +778,10 @@
 }
 else
 {
-  enquire-set_sort_by_value (VALUE_TIMESTAMP, true);
+  bool reversed_sort = not
+  zeitgeist_db_reader_sort_order_for_result_type_is_asc (zg_reader,
+ result_type);
+  enquire-set_sort_by_value (VALUE_TIMESTAMP, reversed_sort);
 }
 
 if (result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_SUBJECTS ||
@@ -786,7 +789,20 @@
 result_type == ZEITGEIST_RESULT_TYPE_MOST_POPULAR_SUBJECTS ||
 result_type == ZEITGEIST_RESULT_TYPE_LEAST_POPULAR_SUBJECTS)
 {
-enquire-set_collapse_key (VALUE_URI_HASH);
+  enquire-set_collapse_key (VALUE_URI_HASH);
+}
+else if (result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_ORIGIN ||
+result_type == ZEITGEIST_RESULT_TYPE_LEAST_RECENT_ORIGIN ||
+result_type == ZEITGEIST_RESULT_TYPE_MOST_POPULAR_ORIGIN ||
+result_type == ZEITGEIST_RESULT_TYPE_LEAST_POPULAR_ORIGIN)
+{
+  // FIXME: not really correct but close :)
+  enquire-set_collapse_key (VALUE_URI_HASH);
+}
+else if (result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_EVENTS ||
+result_type == ZEITGEIST_RESULT_TYPE_LEAST_RECENT_EVENTS)
+{
+  enquire-set_collapse_key (VALUE_EVENT_ID);
 }
 
 Xapian::Query q(query_parser-parse_query (query_string, QUERY_PARSER_FLAGS));
@@ -1096,12 +1112,9 @@
   return NULL;
 }
 
-bool reversed_sort =
-  result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_EVENTS ||
-  result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_SUBJECTS ||
-  result_type == ZEITGEIST_RESULT_TYPE_MOST_POPULAR_SUBJECTS ||
-  result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_ORIGIN ||
-  result_type == ZEITGEIST_RESULT_TYPE_MOST_POPULAR_ORIGIN;
+bool reversed_sort = not
+zeitgeist_db_reader_sort_order_for_result_type_is_asc (zg_reader,
+   result_type);
 
 if (result_type == RELEVANCY_RESULT_TYPE)
 {

=== modified file 'src/db-reader.vala'
--- src/db-reader.vala	2012-03-14 12:31:51 +
+++ src/db-reader.vala	2012-03-16 20:45:24 +
@@ -160,6 +160,56 @@
 return results;
 }
 
+/*
+ * Returns true if the results for the given result_type will be sorted
+ * ascendantly by date, false if they'll be sorted descendingly.
+ **/
+public bool sort_order_for_result_type_is_asc (uint result_type)
+{
+switch (result_type)
+{
+// FIXME: Why are LEAST_POPULAR_* using ASC?
+case ResultType.LEAST_RECENT_EVENTS:
+case ResultType.LEAST_RECENT_EVENT_ORIGIN:
+case ResultType.LEAST_POPULAR_EVENT_ORIGIN:
+case ResultType.LEAST_RECENT_SUBJECTS:
+case ResultType.LEAST_POPULAR_SUBJECTS:
+case ResultType.LEAST_RECENT_CURRENT_URI:
+case ResultType.LEAST_POPULAR_CURRENT_URI:
+case ResultType.LEAST_RECENT_ACTOR:
+case ResultType.LEAST_POPULAR_ACTOR:
+case ResultType.OLDEST_ACTOR:
+case ResultType.LEAST_RECENT_ORIGIN:
+case ResultType.LEAST_POPULAR_ORIGIN:
+case ResultType.LEAST_RECENT_SUBJECT_INTERPRETATION:
+case ResultType.LEAST_POPULAR_SUBJECT_INTERPRETATION:
+case ResultType.LEAST_RECENT_MIMETYPE:
+case ResultType.LEAST_POPULAR_MIMETYPE:
+return true;
+
+case ResultType.MOST_RECENT_EVENTS:
+case ResultType.MOST_RECENT_EVENT_ORIGIN:
+case ResultType.MOST_POPULAR_EVENT_ORIGIN:
+case ResultType.MOST_RECENT_SUBJECTS:
+case ResultType.MOST_POPULAR_SUBJECTS:
+case ResultType.MOST_RECENT_CURRENT_URI:
+case ResultType.MOST_POPULAR_CURRENT_URI:
+case ResultType.MOST_RECENT_ACTOR:
+case ResultType.MOST_POPULAR_ACTOR:
+case ResultType.MOST_RECENT_ORIGIN:
+case ResultType.MOST_POPULAR_ORIGIN:
+case ResultType.MOST_RECENT_SUBJECT_INTERPRETATION:
+case ResultType.MOST_POPULAR_SUBJECT_INTERPRETATION:
+case ResultType.MOST_RECENT_MIMETYPE:
+case ResultType.MOST_POPULAR_MIMETYPE:
+return false;
+
+default:
+warning (Unrecognized ResultType: %u, result_type);
+return true

[Zeitgeist] [Bug 778140] Re: Time warp problem in MOVE_EVENT handling

2012-03-18 Thread Siegfried Gevatter
** Description changed:

  MOVE EVENTS
  
  
  PRESENTATION
  
  By definition, Zeitgeist's events are immutable, and the subject meta-data
  they contain is a snapshot of how a given resource was back when the event
  happened.
  
  To be useful, some way of linking event subjects to their physical
  representation is needed. The primary identifier for doing this is the
  subject's URI.
  
  However, URIs, especially local ones, are transient and may change. To solve
  this problem, a new field was added to subjects, and it is special in that
  it isn't considered to be immutable. This is the `current_uri' field.
  
  INITIAL IDEA
  
  When a subject is inserted, its `current_uri' field is initially set to the
  same value as its `uri' field. When Zeitgeist receives a MOVE_EVENT for that
  file (with a coherent timestamp), the value of `current_uri' is updated to
  its new file name.
  
  The idea here is that this is done in a way that, if we deleted the
  `current_uri' of all subjects and restored them looking at all MOVE_EVENTs
  in the database, the result would be the same as before.
  
  CURRENT IMPLEMENTATION
  
  As of now, `current_uri' is initially set to the same value as `current_uri'.
  Once a MOVE_EVENT is inserted, all events with a timestamp before that of the
  move are updated.
  
  However, after the point the MOVE_EVENT has been inserted, it is never
  considered again. This is so for performance reasons, since the initial plan
  would require pretty much rebuilding the database.
  
  PROBLEMS
  
  There are numerous problems with this implementation, at least in theoretical
  situations.
  
  One problem is that of events coming in after the MOVE_EVENT (maybe because
  the application is batching them). In this case they won't be updated.
  
  We also have the opposite problem, a MOVE_EVENT coming in late after another
  conflicting MOVE_EVENT happened. For instance, we have the following events:
-   T5 a.txt, T10 a.txt, T15 a.txt
+   T5 a.txt, T10 a.txt, T15 a.txt
  We receive a first MOVE_EVENT from a.txt to b.txt with timestamp T7. Now we
  have (time / current_uri):
-   T5 a.txt, T10 b.txt, T15 b.txt
+   T5 a.txt, T10 b.txt, T15 b.txt
  Finally, we receive a further MOVE_EVENT from a.txt to c.txt with timestamp 
T0.
  The result is:
-   T5 c.txt, T10 b.txt, T15 b.txt
+   T5 c.txt, T10 b.txt, T15 b.txt
  This is totally inconsistent; the correct result would have been:
-   T5 c.txt, T10 c.txt, T15 b.txt
+   T5 c.txt, T10 c.txt, T15 b.txt
  
  Further, even if implemented as described in the initial idea section, the
  concept is flawed in that it may happen that events are inserted
  retrospectively using already their updated URI. This could give rise to
  further inconsistencies.
  
  PROPOSAL
  
  No clear way to avoid this problem is evident. Maybe the best idea is to
  formalize the current behavior by documenting it and requesting that MOVE
  and DELETE events be inserted near real time (for local files).
  
- ADDITIONAL PROPOSAL
+ OUTSTANDING ISSUES
  
- So far we haven't taken resource deletions into account at all. However,
- those also affect the URI of a resource, in that it ceases to exist (and
- may be subsequently reused for an unrelated resource).
+ a) Deletion of MOVE_EVENT
+ What happens upon deletion of a MOVE_EVENT? Should the current_uri changes be 
reverted?
  
- For this reason, I propose that DELETE_EVENTs also update `current_uri'. In
- particular, they should change said URI to  (empty).
+ b) Insertion of other events
+ When inserting an event, should Zeitgeist check whether a MOVE_EVENT happened 
for that URI after the event's timestamp, and update it accordingly?
+ 
+ c) Directory
+ Should the insertion of a MOVE_EVENT with the renaming from 
file:///home/user/dir1 to file:///home/user/dir2 also update all events 
with uri file:///home/user/dir1/* to file:///home/user/dir2/*? I think so.
+ 
+ SEE ALSO
+ 
+ Related to this, please also check my proposal for improved DELETE_EVENT
+ handling in bug #954206.

** Description changed:

  MOVE EVENTS
  
  
  PRESENTATION
  
  By definition, Zeitgeist's events are immutable, and the subject meta-data
  they contain is a snapshot of how a given resource was back when the event
  happened.
  
  To be useful, some way of linking event subjects to their physical
  representation is needed. The primary identifier for doing this is the
  subject's URI.
  
  However, URIs, especially local ones, are transient and may change. To solve
  this problem, a new field was added to subjects, and it is special in that
  it isn't considered to be immutable. This is the `current_uri' field.
  
  INITIAL IDEA
  
  When a subject is inserted, its `current_uri' field is initially set to the
  same value as its `uri' field. When Zeitgeist receives a MOVE_EVENT for that
  file (with a coherent timestamp), the value of `current_uri' is updated to
  

[Zeitgeist] [Bug 954206] Re: Improved DELETE_EVENT handling

2012-03-18 Thread Siegfried Gevatter
** Description changed:

  DELETE EVENTS
  
  
  PRESENTATION
  
  When it comes to handling the deletion of files (local or remote
  -FTP/SSH/etc-), Zeitgeist supports the logging of DELETE_EVENTs, but
  that's about it.
  
  There's no clear distinction between what exists and what doesn't. The
  addition of the current_uri field made this worse, since if a file X is
  deleted and at some later point a new file is created with the same name
  they will be considered the same.
  
  PROPOSAL
  
  I propose two measures that should give us some pretty reasonable
  handling of deletions:
  
  a) Extend the StorageMonitor extension with a concept of deleted
  resource. Insertion of DELETE_EVENTs (for local files, and possible
  ftp/sftp/etc) will update the value of storage where appropriate so
  the deleted events will be filtered out when querying with
  StorageState.AVAILABLE.
  
  b) In the engine itself, process DELETE_EVENTs by updating the
  current_uri of relevant subjects. The new URI will take a form like
  deleted://%d where %d is an identifier unique for each deletion
  (incremental integer, most likely).
  
  RANDOM (UNRELATED) THOUGHTS
  
   * This just made me think, would it make sense to add a new resource
  table for data shared between subjects (ie. current_uri and storage)?
  
   * Also, would a current_origin field be useful?
+ 
+ SEE ALSO
+ 
+ Related to this, please also check my proposal for improved MOVE_EVENT
+ handling in bug #778140.

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/954206

Title:
  Improved DELETE_EVENT handling

Status in Zeitgeist Framework:
  New

Bug description:
  DELETE EVENTS
  

  PRESENTATION

  When it comes to handling the deletion of files (local or remote
  -FTP/SSH/etc-), Zeitgeist supports the logging of DELETE_EVENTs, but
  that's about it.

  There's no clear distinction between what exists and what doesn't. The
  addition of the current_uri field made this worse, since if a file X
  is deleted and at some later point a new file is created with the same
  name they will be considered the same.

  PROPOSAL

  I propose two measures that should give us some pretty reasonable
  handling of deletions:

  a) Extend the StorageMonitor extension with a concept of deleted
  resource. Insertion of DELETE_EVENTs (for local files, and possible
  ftp/sftp/etc) will update the value of storage where appropriate so
  the deleted events will be filtered out when querying with
  StorageState.AVAILABLE.

  b) In the engine itself, process DELETE_EVENTs by updating the
  current_uri of relevant subjects. The new URI will take a form like
  deleted://%d where %d is an identifier unique for each deletion
  (incremental integer, most likely).

  RANDOM (UNRELATED) THOUGHTS

   * This just made me think, would it make sense to add a new
  resource table for data shared between subjects (ie. current_uri and
  storage)?

   * Also, would a current_origin field be useful?

  SEE ALSO

  Related to this, please also check my proposal for improved MOVE_EVENT
  handling in bug #778140.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/954206/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 958502] [NEW] New mutable event meta-data: Current Origin

2012-03-18 Thread Siegfried Gevatter
Public bug reported:

With the introduction of current_uri, I'd also make sense to have a
current_origin field (with the associated ResultTypes).

** Affects: zeitgeist
 Importance: Medium
 Status: New

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/958502

Title:
  New mutable event meta-data: Current Origin

Status in Zeitgeist Framework:
  New

Bug description:
  With the introduction of current_uri, I'd also make sense to have a
  current_origin field (with the associated ResultTypes).

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/958502/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 953041] Re: Extraneous actors are inserted into sqlite database during read-only operations

2012-03-18 Thread Siegfried Gevatter
@ Trever Fischer: Thanks! Can you please also add a test case to ensure
this problem doesn't creep back?

** Changed in: zeitgeist
   Status: In Progress = Fix Committed

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/953041

Title:
  Extraneous actors are inserted into sqlite database during read-only
  operations

Status in Zeitgeist Framework:
  Fix Committed

Bug description:
  Example code:

  import time, os
  from gi.repository import GObject
  from zeitgeist.client import ZeitgeistClient
  from zeitgeist.datamodel import Event, Subject, Interpretation
  zg = ZeitgeistClient()

  event_template = Event()
  event_template.actor = foo

  mainloop = GObject.MainLoop()

  def callback(events):
  print len(events)
  mainloop.quit()

  zg.find_events_for_templates([event_template], callback, num_events=100, 
result_type=0)
  mainloop.run()

  Searching the actors table in sqlite shows a foo actor after
  execution.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/953041/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 932989] Re: Make FTS++ optional

2012-03-18 Thread Siegfried Gevatter
** Changed in: zeitgeist
 Assignee: (unassigned) = Moritz Neeb (zormit)

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/932989

Title:
  Make FTS++ optional

Status in Zeitgeist Framework:
  New

Bug description:
  * Make FTS++ optional.
  * Make the fts.vala extension behave if FTS++ isn't there.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/932989/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 959615] [NEW] Sorting of LEAST_POPULAR_* result type

2012-03-19 Thread Siegfried Gevatter
Public bug reported:

 // FIXME: Why are LEAST_POPULAR_* using ASC?

** Affects: zeitgeist
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/959615

Title:
  Sorting of LEAST_POPULAR_* result type

Status in Zeitgeist Framework:
  New

Bug description:
   // FIXME: Why are LEAST_POPULAR_* using ASC?

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/959615/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/fix-950983 into lp:zeitgeist

2012-03-19 Thread Siegfried Gevatter
Review: Abstain

OK
-- 
https://code.launchpad.net/~zeitgeist/zeitgeist/fix-950983/+merge/98176
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/fix-950983 into lp:zeitgeist

2012-03-19 Thread Siegfried Gevatter
Review: Approve


-- 
https://code.launchpad.net/~zeitgeist/zeitgeist/fix-950983/+merge/98176
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~tdfischer/zeitgeist/timerange-deletion-api into lp:zeitgeist

2012-03-19 Thread Siegfried Gevatter
Review: Needs Fixing

Hi Trever,

First of all, thank you for working on this!

As commented on IRC, I don't really see a point for storage_state, num_events 
and result_type in the event deletion method. The original proposal just had 
time_range and event_templates.

(I'm also unconvinced that this methods performance is critical enough to 
warrant the complexity of duplicating the query. I think I may prefer a 
FindEventIds+DeleteEvents implementation, like Seif proposed.)
-- 
https://code.launchpad.net/~tdfischer/zeitgeist/timerange-deletion-api/+merge/97272
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/fts-origin-hashing into lp:zeitgeist

2012-03-19 Thread Siegfried Gevatter
Siegfried Gevatter has proposed merging 
lp:~zeitgeist/zeitgeist/fts-origin-hashing into lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)

For more details, see:
https://code.launchpad.net/~zeitgeist/zeitgeist/fts-origin-hashing/+merge/98281
-- 
https://code.launchpad.net/~zeitgeist/zeitgeist/fts-origin-hashing/+merge/98281
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~zeitgeist/zeitgeist/fts-origin-hashing into lp:zeitgeist.
=== modified file 'extensions/fts++/indexer.cpp'
--- extensions/fts++/indexer.cpp	2012-03-16 20:03:05 +
+++ extensions/fts++/indexer.cpp	2012-03-19 20:32:18 +
@@ -43,6 +43,7 @@
 const Xapian::valueno VALUE_EVENT_ID = 0;
 const Xapian::valueno VALUE_TIMESTAMP = 1;
 const Xapian::valueno VALUE_URI_HASH = 2;
+const Xapian::valueno VALUE_ORIGIN_HASH = 3;
 
 #define QUERY_PARSER_FLAGS \
   Xapian::QueryParser::FLAG_PHRASE | Xapian::QueryParser::FLAG_BOOLEAN | \
@@ -778,7 +779,9 @@
 }
 else
 {
-  enquire-set_sort_by_value (VALUE_TIMESTAMP, true);
+  bool reversed_sort = not
+  zeitgeist_result_type_is_sort_order_asc (result_type);
+  enquire-set_sort_by_value (VALUE_TIMESTAMP, reversed_sort);
 }
 
 if (result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_SUBJECTS ||
@@ -786,7 +789,19 @@
 result_type == ZEITGEIST_RESULT_TYPE_MOST_POPULAR_SUBJECTS ||
 result_type == ZEITGEIST_RESULT_TYPE_LEAST_POPULAR_SUBJECTS)
 {
-enquire-set_collapse_key (VALUE_URI_HASH);
+  enquire-set_collapse_key (VALUE_URI_HASH);
+}
+else if (result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_ORIGIN ||
+result_type == ZEITGEIST_RESULT_TYPE_LEAST_RECENT_ORIGIN ||
+result_type == ZEITGEIST_RESULT_TYPE_MOST_POPULAR_ORIGIN ||
+result_type == ZEITGEIST_RESULT_TYPE_LEAST_POPULAR_ORIGIN)
+{
+  enquire-set_collapse_key (VALUE_ORIGIN_HASH);
+}
+else if (result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_EVENTS ||
+result_type == ZEITGEIST_RESULT_TYPE_LEAST_RECENT_EVENTS)
+{
+  enquire-set_collapse_key (VALUE_EVENT_ID);
 }
 
 Xapian::Query q(query_parser-parse_query (query_string, QUERY_PARSER_FLAGS));
@@ -1096,12 +,8 @@
   return NULL;
 }
 
-bool reversed_sort =
-  result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_EVENTS ||
-  result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_SUBJECTS ||
-  result_type == ZEITGEIST_RESULT_TYPE_MOST_POPULAR_SUBJECTS ||
-  result_type == ZEITGEIST_RESULT_TYPE_MOST_RECENT_ORIGIN ||
-  result_type == ZEITGEIST_RESULT_TYPE_MOST_POPULAR_ORIGIN;
+bool reversed_sort = not
+zeitgeist_result_type_is_sort_order_asc (result_type);
 
 if (result_type == RELEVANCY_RESULT_TYPE)
 {
@@ -1126,10 +1137,8 @@
 result_type == ZEITGEIST_RESULT_TYPE_MOST_POPULAR_ORIGIN ||
 result_type == ZEITGEIST_RESULT_TYPE_LEAST_POPULAR_ORIGIN)
 {
-  // FIXME: not really correct but close :)
   enquire-set_sort_by_relevance_then_value (VALUE_TIMESTAMP, reversed_sort);
-  enquire-set_collapse_key (VALUE_URI_HASH);
-  maxhits *= 3;
+  enquire-set_collapse_key (VALUE_ORIGIN_HASH);
 }
 else
 {
@@ -1311,19 +1320,36 @@
 return; // ignore this event completely...
   }
 
+  guint8 uri_hash[HASH_LENGTH + 1];
+
   // We need the subject URI so we can use Xapian's collapse key feature
   // for *_SUBJECT grouping. However, to save space, we'll just save a hash.
   // A better option would be using URI's id, but for that we'd need a SQL
   // query that'd be subject to races.
   // FIXME(?): This doesn't work for events with multiple subjects.
   g_checksum_update (checksum, (guchar *) uri.c_str (), -1);
-  guint8 uri_hash[HASH_LENGTH + 1];
   gsize hash_size = HASH_LENGTH;
   g_checksum_get_digest (checksum, uri_hash, hash_size);
   g_checksum_reset (checksum);
   g_assert (hash_size == HASH_LENGTH);
   doc.add_value (VALUE_URI_HASH, std::string((char *) uri_hash, hash_size));
 
+  size_t colon_pos = uri.find (':');
+  // FIXME: use current_origin once we have that
+  val = zeitgeist_subject_get_origin (subject);
+  // Make sure the schemas of the URI and the origin is the same,
+  // to avoid saving some junk.
+  if (val  colon_pos != std::string::npos
+   strncmp (uri.c_str (), val, colon_pos+1) == 0)
+  {
+  g_checksum_update (checksum, (guchar *) val, -1);
+  g_checksum_get_digest (checksum, uri_hash, hash_size);
+  g_checksum_reset (checksum);
+  g_assert (hash_size == HASH_LENGTH);
+  doc.add_value (VALUE_ORIGIN_HASH,
+ std::string((char *) uri_hash, hash_size));
+  }
+
   val = zeitgeist_subject_get_text (subject);
   if (val  val[0] != '\0')
   {

=== modified file 'src/datamodel.vala'
--- src/datamodel.vala	2012-02-18 21:33:57 +
+++ src

Re: [Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/fts-origin-hashing into lp:zeitgeist

2012-03-19 Thread Siegfried Gevatter
Maybe move the md5 summing into a function? It's ugly :p
-- 
https://code.launchpad.net/~zeitgeist/zeitgeist/fts-origin-hashing/+merge/98281
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~zeitgeist/zeitgeist/fts-origin-hashing into lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~zeitgeist/zeitgeist/fts-origin-hashing into lp:zeitgeist

2012-03-19 Thread Siegfried Gevatter
Review: Approve

Lovely :)
-- 
https://code.launchpad.net/~zeitgeist/zeitgeist/fts-origin-hashing/+merge/98281
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 964219] Re: Issues with unity dash not working due to ZG DB

2012-03-24 Thread Siegfried Gevatter
Hi,

Can you please try starting Zeitgeist with zeitgeist-daemon -r --log-
level=debug --log-file=zeitgeist.txt, reproduce the problem in Unity,
and then attach the resulting zeitgeist.txt file?

Thanks

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/964219

Title:
  Issues with unity dash not working due to ZG DB

Status in Zeitgeist Framework:
  New

Bug description:
  My Unity dash is failing to show items due to ZG having a DB issue.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/964219/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~rainct/zeitgeist/limit-dbus-mb into lp:zeitgeist

2012-03-26 Thread Siegfried Gevatter
Siegfried Gevatter has proposed merging lp:~rainct/zeitgeist/limit-dbus-mb into 
lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)

For more details, see:
https://code.launchpad.net/~rainct/zeitgeist/limit-dbus-mb/+merge/99349
-- 
https://code.launchpad.net/~rainct/zeitgeist/limit-dbus-mb/+merge/99349
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~rainct/zeitgeist/limit-dbus-mb into lp:zeitgeist.
=== modified file 'src/datamodel.vala'
--- src/datamodel.vala	2012-03-20 12:19:23 +
+++ src/datamodel.vala	2012-03-26 15:10:24 +
@@ -621,6 +621,44 @@
 return vb.end ();
 }
 
+public static Variant to_variant_with_limit (GenericArrayEvent? events)
+throws EngineError
+{
+var vb = new VariantBuilder(new VariantType(a(+Utils.SIG_EVENT+)));
+
+size_t variant_size = 0;
+
+for (int i = 0; i  events.length; ++i)
+{
+Variant event_variant;
+
+if (events[i] != null)
+{
+event_variant = events[i].to_variant ();
+}
+else
+{
+event_variant = get_null_event_variant ();
+}
+
+variant_size += event_variant.get_size();
+if (variant_size  Utils.MAX_DBUS_RESULT_SIZE)
+{
+size_t avg_event_size = variant_size / (i+1);
+string error_message = (Query exceeded size limit of %  +
+size_t.FORMAT + MiB (roughly ~%d events).).printf (
+Utils.MAX_DBUS_RESULT_SIZE / 1024 / 1024,
+Utils.MAX_DBUS_RESULT_SIZE / avg_event_size);
+warning (error_message);
+throw new EngineError.TOO_MANY_RESULTS (error_message);
+}
+
+vb.add_value (event_variant);
+}
+
+return vb.end ();
+}
+
 private static Variant get_null_event_variant ()
 {
 var vb = new VariantBuilder (new VariantType ((+Utils.SIG_EVENT+)));

=== modified file 'src/errors.vala'
--- src/errors.vala	2012-01-25 17:37:55 +
+++ src/errors.vala	2012-03-26 15:10:24 +
@@ -29,10 +29,11 @@
 DATABASE_CORRUPT,
 DATABASE_ERROR,
 DATABASE_RETIRE_FAILED,
+EXISTING_INSTANCE,
 INVALID_ARGUMENT,
 INVALID_KEY,
-EXISTING_INSTANCE,
 INVALID_SIGNATURE, // FIXME: change from EngineError to sth. + public
+TOO_MANY_RESULTS,
 }
 
 // vala doesn't include proper headers, this fixes it

=== modified file 'src/utils.vala'
--- src/utils.vala	2012-03-01 14:47:30 +
+++ src/utils.vala	2012-03-26 15:10:24 +
@@ -38,6 +38,7 @@
 // D-Bus
 public const string DBUS_INTERFACE = ;
 public const string SIG_EVENT = asaasay;
+public const size_t MAX_DBUS_RESULT_SIZE = 4 * 1024 * 1024; // 4MiB
 
 // configure runtime cache for events
 // default size is 2000

=== modified file 'src/zeitgeist-daemon.vala'
--- src/zeitgeist-daemon.vala	2012-03-01 14:47:30 +
+++ src/zeitgeist-daemon.vala	2012-03-26 15:10:24 +
@@ -138,7 +138,7 @@
 var timer = new Timer ();
 GenericArrayEvent events = engine.get_events (event_ids);
 debug (%s executed in %f seconds, Log.METHOD, timer.elapsed ());
-return Events.to_variant (events);
+return Events.to_variant_with_limit (events);
 }
 
 public string[] find_related_uris (Variant time_range,
@@ -176,7 +176,7 @@
 Events.from_variant (event_templates),
 storage_state, num_events, result_type, sender);
 debug (%s executed in %f seconds, Log.METHOD, timer.elapsed ());
-return Events.to_variant (events);
+return Events.to_variant_with_limit (events);
 }
 
 public uint32[] insert_events (

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~tdfischer/zeitgeist/event-caching into lp:zeitgeist

2012-03-26 Thread Siegfried Gevatter
Review: Needs Fixing

Hi Trever,

Nice work, thanks for working on this!

Some comments:

 max_cache_size = 1024;
We have a (so far unused) constant for this in src/utils.vala: Utils.CACHE_SIZE.

+uncached_ids.resize(uncached_ids.length+1);
+uncached_ids[uncached_ids.length-1] = event_ids[i];
You can use += here (which looks nicer and does power-of-two allocations).

+cache = new EventCache();
  ^ space
+ for(int i = 0; i  event_ids.length; i++)
 ^ space
And more spaces missing in function declarations in event-cache.vala.

Also, see the comment:

// TODO: Consider if we still want the cache. [...]
//  It'd also benchmark it again first, we may have better options
//  to enhance the performance of SQLite now, and event processing
//  will be faster now being C.

Some numbers about how this affects performance for different queries (cold 
query vs hot query vs mixed query with and without cache).
-- 
https://code.launchpad.net/~tdfischer/zeitgeist/event-caching/+merge/97450
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~tdfischer/zeitgeist/warning-fixes into lp:zeitgeist

2012-03-26 Thread Siegfried Gevatter
Review: Needs Fixing

19:11 RainCT tdfischer: we are using braces on separate lines
-- 
https://code.launchpad.net/~tdfischer/zeitgeist/warning-fixes/+merge/99374
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~tdfischer/zeitgeist/timerange-deletion-api into lp:zeitgeist

2012-03-26 Thread Siegfried Gevatter
(Follow up from IRC: the too many variables bug has already been fixed)
-- 
https://code.launchpad.net/~tdfischer/zeitgeist/timerange-deletion-api/+merge/97272
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 961974] Re: dash (or file lens) doesn't find file

2012-03-26 Thread Siegfried Gevatter
** Changed in: zeitgeist
   Importance: Undecided = Medium

** Changed in: zeitgeist
Milestone: None = 0.9.0

** Changed in: zeitgeist
 Assignee: (unassigned) = Siegfried Gevatter (rainct)

** Changed in: zeitgeist
   Status: New = In Progress

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/961974

Title:
  dash (or file lens) doesn't find file

Status in Unity:
  Incomplete
Status in Unity Files Lens:
  Incomplete
Status in Zeitgeist Framework:
  In Progress

Bug description:
  This is based on the checkbox test:
  1. Start gedit.
  2. Save a file named foo in your home folder.
  1. Tap super to open the dash
  2. Enter f
 - The results should contain at least the foo file and Firefox
  3. Click on the cross next to f, in the textentry
 - The f search should be canceled, bringing you back to the generic 
Search entry with the default elements

  
  I slightly modified it and instead of file called foo I have a 
hello_world_file (as foo returned far too many other results).

  Actual result:
  The file can not be found via dash (or file lens).

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: unity 5.6.0+bzr2156ubuntu0+670 [origin: LP-PPA-unity-team-staging]
  ProcVersionSignature: Ubuntu 3.2.0-19.31-generic-pae 3.2.12
  Uname: Linux 3.2.0-19-generic-pae i686
  ApportVersion: 1.94.1-0ubuntu2
  Architecture: i386
  CompizPlugins: 
[core,composite,opengl,compiztoolbox,decor,vpswitch,snap,mousepoll,resize,place,move,wall,grid,regex,imgpng,session,gnomecompat,animation,fade,unitymtgrabhandles,workarounds,scale,expo,ezoom,unityshell]
  CrashDB: unity
  Date: Thu Mar 22 10:00:40 2012
  InstallationMedia: Ubuntu 11.10 Oneiric Ocelot - Release i386 (20111012)
  SourcePackage: unity
  UpgradeStatus: Upgraded to precise on 2012-02-17 (33 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/unity/+bug/961974/+subscriptions

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


<    1   2   3   4   5   6   >