#10379 NORM Not Tri: Implement dotted activity versions to sugar 0.84

Zarro Boogs per Child bugtracker at laptop.org
Fri Oct 1 19:05:30 EDT 2010


#10379: Implement dotted activity versions to sugar 0.84
------------------------------------+---------------------------------------
           Reporter:  godiard       |       Owner:  godiard                           
               Type:  enhancement   |      Status:  new                               
           Priority:  normal        |   Milestone:  Not Triaged                       
          Component:  not assigned  |     Version:  Development source as of this date
         Resolution:                |    Keywords:                                    
        Next_action:  review        |    Verified:  0                                 
Deployment_affected:                |   Blockedby:                                    
           Blocking:                |  
------------------------------------+---------------------------------------
Changes (by godiard):

 * cc: erikos (added)


Comment:

 '''Patches:'''

 The patches have a lot of logging, because i need to continue testing.

 To sugar-jhbuild:

 0001-add-sugar-update-control-to-0.84-modulset.patch

 To sugar-toolkit:

 0001-change-the-version-from-the-activity-from-int-to-str.patch

 0001-Add-class-to-parse-and-compare-the-bundles-version-n.patch

 To sugar-update-control:

 0001-changes-to-enable-the-use-of-dotted-number-version-i.patch

 Changes to bitfrost:

 I have installed the bitfrost rpm (bitfrost.x86_64 0:1.0.8-1.fc11) and
 needed to change two files only.

 In the file /usr/lib64/python2.6/site-packages/bitfrost/leases/keys.py
 and coment the following lines (I am testing in a VM, but now I think
 could create the directory instead):

 {{{
 # First, a crude check to ensure that OFW is available.
 -if not os.path.exists("/ofw/mfg-data"):
 -    raise Exception("OFW is not mounted, cannot read deployment keys")
 +#if not os.path.exists("/ofw/mfg-data"):
 +#   raise Exception("OFW is not mounted, cannot read deployment keys")
 }}}

 Also i modified the following file to use activities versions as strings.

 {{{
 [root at f11-sugar-devel update]# diff -u microformat.py /home/gonzalo/sugar-
 devel/dotted-versions/bitfrost-update/microformat.py
 --- microformat.py    2010-03-22 17:31:42.000000000 -0300
 +++ /home/gonzalo/sugar-devel/dotted-versions/bitfrost-
 update/microformat.py    2010-09-28 13:30:27.000000000 -0300
 @@ -134,11 +134,8 @@
          if self.in_activity_id > 0:
              self.last_id = data.strip()
          if self.in_activity_version > 0:
 -            try:
 -                self.last_version = long(data.strip())
 -            except:
 -                if _DEBUG_PARSER:
 -                    print "BAD VERSION NUMBER:", self.last_id, data
 +            self.last_version = data.strip()
 +
      def handle_endtag(self, tag):
          if self.in_group_name > 0:
              self.in_group_name -= 1
 }}}

 '''Testing:'''

 I have created http://wiki.laptop.org/go/Activities/G1G1-TestGon with a
 subset of activities, and have modified Calculate and Browse activities
 (only the activity_version field in the activity.info file)

 I have tested the update in the panel control, and downloading activities
 with the Browse.

 There are a file test_versions.py in sugar-toolkit/tests/lib to test the
 schema used.

-- 
Ticket URL: <http://dev.laptop.org/ticket/10379#comment:1>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list