Firmware, add repository and origin to local pkg query as well and use this one if installed.

This commit is contained in:
Ad Schellevis 2019-07-02 13:20:54 +02:00
parent cdec5df11b
commit 930bb1002c
2 changed files with 2 additions and 5 deletions

View File

@ -763,11 +763,8 @@ class FirmwareController extends ApiControllerBase
if (isset($packages[$translated['name']])) {
/* local iteration, mark package provided */
$translated['provided'] = '1';
/* XXX could be simplified, init with remote, overwrite with local when provided */
$translated['origin'] = $packages[$translated['name']]['origin'];
$translated['repository'] = $packages[$translated['name']]['repository'];
$translated['path'] = "{$translated['repository']}/{$translated['origin']}";
}
$translated['path'] = "{$translated['repository']}/{$translated['origin']}";
$packages[$translated['name']] = $translated;
/* figure out local and remote plugins */

View File

@ -120,7 +120,7 @@ type:script_output
message:Querying %s package details
[local]
command: pkg query "%n|||%v|||%c|||%sh|||%k|||%L|||0|||"; \
command: pkg query "%n|||%v|||%c|||%sh|||%k|||%L|||%R|||%o""; \
/usr/local/opnsense/scripts/firmware/sets.sh '|||'
parameters:
type:script_output