From 930bb1002c686f30533db5d9732c5346446e1d82 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 2 Jul 2019 13:20:54 +0200 Subject: [PATCH] Firmware, add repository and origin to local pkg query as well and use this one if installed. --- .../app/controllers/OPNsense/Core/Api/FirmwareController.php | 5 +---- src/opnsense/service/conf/actions.d/actions_firmware.conf | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php b/src/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php index 770e002e1..3f0a71336 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php @@ -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 */ diff --git a/src/opnsense/service/conf/actions.d/actions_firmware.conf b/src/opnsense/service/conf/actions.d/actions_firmware.conf index b2bb7db13..8911a24fe 100644 --- a/src/opnsense/service/conf/actions.d/actions_firmware.conf +++ b/src/opnsense/service/conf/actions.d/actions_firmware.conf @@ -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