Changes

Jump to navigation Jump to search
Line 60: Line 60:  
=== Repositories ===
 
=== Repositories ===
   −
Current implementation is designed to work in close cooperation with the [[Sugar Network]] installing dependencies required by Sugar Activities. To make it possible, Sugar Network supports a [http://network.sugarlabs.org/hub/?projects&packages list of metadata entries] for all required packages on major GNU/Linux distributions (to support not only XO laptops). Each activity, which requires dependencies, should mention proper metadata entry names in the {{Code|requires}} tag in the {{activity.info}} file. Client side startup code will process this dependency list and ask PackageKit to install packages via packagekit-presolve-backend.
+
Current implementation is designed to work in close cooperation with the [[Sugar Network]] installing dependencies required by Sugar Activities. To make it possible, Sugar Network supports a [http://network.sugarlabs.org/hub/?projects&packages list of metadata entries] for all required packages on major GNU/Linux distributions (to support not only XO laptops). Each activity, which requires dependencies, should mention proper metadata entry names in the [[Sugar_Network/Recipe_Specification#requires|activity.info]] file. Client side startup code will process this dependency list and ask PackageKit to install packages via packagekit-presolve-backend.
   −
While working, packagekit-presolve-backend will use public [[Platform_Team/Sugar_Network/API|Sugar Network API]]. The regular operations called from the API server are the following:
+
While working, packagekit-presolve-backend will use public [[Platform_Team/Sugar_Network/API|Sugar Network API]] (look for development API server for recently implemented functionality). The regular operations called from the API server are the following:
 +
 
 +
<div id="GET_packages"></div>
    
  '''GET''' /packages/OLPC/''OLPC-RELEASE''/''METADATA-ENTRY-NAME''
 
  '''GET''' /packages/OLPC/''OLPC-RELEASE''/''METADATA-ENTRY-NAME''
   −
Return a dependency tree for particular entry from the [http://network.sugarlabs.org/hub/?projects&packages metadata list]. The result will server in JSON notation in form of:
+
This request returns a dependency tree for particular entry from the [http://network.sugarlabs.org/hub/?projects&packages metadata list]. The result will be served in JSON notation in form of:
 +
 
 +
"''ARCH''": [{"name": "''PACKAGE''", "version": "''VERSION''", "release": "''RELEASE''", "path": "''PATH''"}]
 +
 
 +
Where {{Code|PATH}} is either relative or absolute path to the targeting rpm on the same server.
 +
 
 +
<div id="GET_packages_updates"></div>
   −
  "arhc": {"name": "''RPM-NAME''", "version": "''RPM-VERSION''", "release": "''RPM-RELEASE''", "path": "''RPM-PATH''"}
+
  '''GET''' /packages/OLPC/''OLPC-RELEASE''/updates
   −
Where {{Code|RPM-PATH}} is either relative or absolute path to the targeting rpm on the same server.
+
Returns JSON list of package names to fetch updates for. Sugar Network server will dynamically generate response according to HTTP {{Code|If-Modified-Since}} header value.
    
=== Usage ===
 
=== Usage ===

Navigation menu