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

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Thu Jun 4 17:05:25 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 tch):

 I spent some time looking at the defaults favorites and general favorites
 code. Lets say, in the scenario b), that we want to favorite everything
 except for what its declared in the blacklist.

 At first glance it seems like a simple change but, once you understand how
 favorites currently works, it suggest that it will actually require to
 change not only the defaults favorites code but also the general favorites
 code. Here is why:

 Assume we remove activities.defaults and a new
 activities.blacklist.defaults file, then during the first Sugar startup it
 will favorite every activity that is installed at that point except for
 those in the blacklist.

 Then, these favorite activities will then be stored in
 ~/.sugar/default/favorite_activities along with the general (declared by
 the user in runtime) favorites. There is no more distinction between
 defaults and general favorites.

 Now, lets say the user removes one favorite that is not in
 activities.blacklist.defaults, Sugar will remove that entry from
 ~/.sugar/default/favorite_activities. Now imagine when Sugar restarts,
 since that activity is not in the blacklist, it will be favorited again
 (by definition), annoying the user and making the "favorite" concept even
 more inconsistent.

 If we try to workaround this case by checking at
 ~/.sugar/default/favorite_activities during startup (ie., to make sure is
 not there to avoid making it a favorite), we will be back to square one,
 because activities installed when sugar was not running are not included
 in ~/.sugar/default/favorite_activities anyway, therefore won't be
 favorited during sugar startup.

 So to make this truly consistent, we will need to change the general code
 for favorites, to think in terms of blacklisted_activities and say that
 everything is a favorite unless the user say otherwise in runtime. E.g,
 maintaining a ~/.sugar/default/blacklist_activities instead of
 ~/.sugar/default/favorite_activities.

 Also, the blacklist.defeaults entries will require a double check during
 startup to make sure these are also in
 ~/.sugar/default/blacklist_activities, otherwise it would prevent users
 from favorite Log or Terminal if they want to.

 I would appreciate if you guys can double check if this logic is correct,
 but if it is, it means this change requires some redesign not simply a
 fix.
\
\
\

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


More information about the Bugs mailing list