1) Add a new optional argument to the pkg_search action: "search_excludes" (string or array of strings). This will exclude matches which contain a restricted string.
2) Add a new output field to the search results:
"pkg_search":{"results_order":[list of origins by priority], <other results/data> }
3) Adjust how the search is performed when the search term has multiple words. First look for any result which contains all the words, then if nothing is found look for any result which contains any of the words.
Added subsections to section 3: dispatcher, life preserver, and system state.
Added examples of dispatcher messaging to parts of section 4: Classes.
Added further examples of messaging to section 3 in the subsections.
This will remove the given packages from the system.
Required arguments:
"pkg_origins" = (single origin string or array of origin strings).
Optional arguments:
"recursive" = "true" or "false" (default: "true"). If true, other packages which depend on this package will also be removed (no broken dependencies).
NOTE: The actual information will be returned as a Dispatcher event - this API call just queues up the pkg operation (limitation of pkg - only one process call at a time)
REST Request:
-------------------------------
PUT /sysadm/pkg
{
"recursive" : "false",
"action" : "pkg_remove",
"pkg_origins" : "games/angband"
}
WebSocket Request:
-------------------------------
{
"id" : "fooid",
"name" : "pkg",
"namespace" : "sysadm",
"args" : {
"action" : "pkg_remove",
"recursive" : "false",
"pkg_origins" : "games/angband"
}
}
Response:
-------------------------------
{
"args": {
"pkg_remove": {
"proc_cmd": "pkg delete -y games/angband",
"proc_id": "sysadm_pkg_remove-{2aa844aa-f6a8-4e8f-ae71-b56af735ccb8}",
"status": "pending"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This will install the given packages on the system.
Required arguments:
"pkg_origins" = (single origin string or array of origin strings).
Optional arguments:
"repo": Name of the remote repository to use (if not supplied, pkg will automatically determine repository).
NOTE: The actual information will be returned as a Dispatcher event - this API call just queues up the pkg operation (limitation of pkg - only one process call at a time)
REST Request:
-------------------------------
PUT /sysadm/pkg
{
"pkg_origins" : "games/angband",
"action" : "pkg_install",
"repo" : "pcbsd-major"
}
WebSocket Request:
-------------------------------
{
"name" : "pkg",
"namespace" : "sysadm",
"id" : "fooid",
"args" : {
"action" : "pkg_install",
"pkg_origins" : "games/angband",
"repo" : "pcbsd-major"
}
}
Response:
-------------------------------
{
"args": {
"pkg_install": {
"proc_cmd": "pkg install -y --repository \"pcbsd-major\" games/angband",
"proc_id": "sysadm_pkg_install-{ae444472-47df-4a65-91eb-013cc82ce4ad}",
"status": "pending"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This will have pkg update it's databases if necessary (not typically used).
Optional argument: "force" = "true" or "false" (default: "false"). If true, this will force pkg to completely re-sync all databases with all known repos (may take some time).
NOTE: The actual information will be returned as a Dispatcher event - this API call just queues up the pkg operation (limitation of pkg - only one process call at a time)
REST Request:
-------------------------------
PUT /sysadm/pkg
{
"force" : "true",
"action" : "pkg_update"
}
WebSocket Request:
-------------------------------
{
"id" : "fooid",
"name" : "pkg",
"namespace" : "sysadm",
"args" : {
"force" : "true",
"action" : "pkg_update"
}
}
Response:
-------------------------------
{
"args": {
"pkg_update": {
"proc_cmd": "pkg update -f",
"proc_id": "sysadm_pkg_update-{8d65bbc5-fefc-4f34-8743-167e61a54c4c}",
"status": "pending"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This will have pkg check to see if there are any package updates available.
NOTE: The actual information will be returned as a Dispatcher event - this API call just queues up the pkg operation (limitation of pkg - only one process call at a time)
REST Request:
-------------------------------
PUT /sysadm/pkg
{
"action" : "pkg_check_upgrade"
}
WebSocket Request:
-------------------------------
{
"args" : {
"action" : "pkg_check_upgrade"
},
"namespace" : "sysadm",
"name" : "pkg",
"id" : "fooid"
}
Response:
-------------------------------
{
"args": {
"pkg_check_upgrade": {
"proc_cmd": "pkg upgrade -n",
"proc_id": "sysadm_pkg_check_upgrade-{c5e9d9a1-7c49-4a70-9d7c-4a84277c83b0}",
"status": "pending"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}