[Bugs] #4841 Sugar NORM: Only some newly installed system-wide activities are favorites

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Wed Jun 24 20:26:48 EDT 2015


#4841: Only some newly installed system-wide activities are favorites
---------------------+-------------------------------------
  Reporter:  quozl   |            Owner:
      Type:  defect  |           Status:  new
  Priority:  Normal  |        Milestone:
 Component:  Sugar   |          Version:  Git as of bugdate
  Severity:  Minor   |       Resolution:
  Keywords:          |  Distribution/OS:  Ubuntu
Bug Status:  New     |
---------------------+-------------------------------------
\
\
\
\
\
\

Comment (by quozl):

 Thanks for working on this.
 ----
 The scenario is a well known class of problem that has been solved in
 other software components by adding a notification to the post-install
 script of the package.

 You can see examples by searching for interprocess communication methods
 in /var/lib/dpkg/info/*.postinst.  Methods include calling /usr/bin/touch
 to create a file in /var/run which is then deleted by a daemon, or sending
 D-Bus messages to the system bus using /usr/bin/dbus-send, or sending a
 SIGHUP signal using /bin/kill or the shell built-in.  The method must be
 harmless if Sugar is not running.

 A Debian package postinst is guaranteed to run when all the files are in
 place.  A similar mechanism is available for Red Hat derived
 distributions.
 ----
 The delay you propose is a good start, but it would be better to set the
 delay to 100ms and continue to repeat the callback (return True) if the
 directory is not yet ready.  See
 [https://github.com/quozl/sugar/commit/d3c0474 revised patch], untested.
 However, this will be noisy, because add_bundle presumes to log an
 exception every time, and an invalid bundle will cause a performance hit.
 An internal method to look for the activity.info file may be better.  A
 give-up countdown may be better.
 ----
 I don't think it is necessary to handle the removal of the
 /usr/share/sugar/activities/ directory, as even with an upgrade of every
 activity the packages are processed one by one.  For the moment, remove
 one activity from the remove everything test.
\
\
\

--
Ticket URL: <http://bugs.sugarlabs.org/ticket/4841#comment:18>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list