summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/pkg-utils.inc
Commit message (Collapse)AuthorAgeFilesLines
* Update cache when GUI successfully update pkg metadataRenato Botelho2017-08-111-0/+6
|
* Speedup get_system_pkg_version() considering only installed packagesRenato Botelho2017-08-101-2/+2
|
* Use cache file to show pfSense version informationRenato Botelho2017-08-101-4/+18
|
* Run rc.update_pkg_metadata in background when repository changesRenato Botelho2017-08-101-1/+3
|
* Remove extra spaces from User AgentRenato Botelho2017-07-051-1/+1
|
* Send uniqueid instead of UUID on user-agentRenato Botelho2017-07-051-2/+2
|
* Declare user_agent variable in the function it's usedRenato Botelho2017-07-051-10/+5
|
* Refine some syslogd restarts, add a way to send it a HUP to reload w/o a ↵jim-p2017-05-151-6/+6
| | | | full restart. Part of ticket #7256
* get_pkg_info improve installed_pkgs_only casePhil Davis2017-05-021-5/+24
|
* Merge pull request #3659 from PiBa-NL/plugin_optimize_20170321Renato Botelho2017-04-251-0/+7
|\
| * pkg_call_plugins put includefile and supported plugins in the normal ↵PiBa-NL2017-03-291-0/+7
| | | | | | | | config.xml so there is no need to parse the package xml for them. this improves performance significantly for several pages like such as 'ipsec overview' and 'openvpn server edit page' which use certificates and gatewaygroups which acquire some information from plugins.
* | Remove redundant check, get_pkg_info() call uses a parameter to return only ↵Renato Botelho2017-04-191-5/+0
| | | | | | | | installed packages
* | Fix indent and spacesRenato Botelho2017-04-191-24/+49
| |
* | Use correct function (is_pkg_installed) and unbreak get_pkg_info()Renato Botelho2017-04-191-2/+2
|/
* load package add-on tabs into config to avoid parsing all installed package ↵PiBa-NL2017-03-261-0/+3
| | | | xml's, fix tabgroup filter
* Run custom deinstall commands during the deinstall phase instead of ↵jim-p2017-03-161-1/+1
| | | | post-deinstall, otherwise they will never get run. Fixes #7401
* Some small improvements to help with ticket #7256jim-p2017-03-071-8/+6
| | | | They don't fix the problem but avoid some pitfalls that could contribute to it.
* Fix the pkg_call() and set the timeout to a sane value (Bug #6594)doktornotor2017-02-241-2/+2
|
* Fix #7257: Use pfSense-upgrade to look for new versionsRenato Botelho2017-02-141-7/+15
|
* Code with multiple %s in etcPhil Davis2017-02-011-2/+2
|
* Misc cleanups at get_pkg_info()stilez2017-01-301-34/+34
| | | | | | * rename function args to be clearer what they do ($local_only was quite ambiguous, at first sight it could mean any of: "don't update local catalog copy", "only check local catalog copy", or "only report local installed pkgs") * merge nested if () conditions * refactor minor code stuff * rewrite explanatory comment
* fix copy/paste - I think!stilez2017-01-261-32/+6
|
* use wrapped version of pkg info -e insteadstilez2017-01-251-5/+31
|
* get_pkg_info() fallback using pkg info if no local copy of repo catalog ↵stilez2017-01-221-6/+34
| | | | | | | | | | | | | (resubmit) Resubmit of PR #3157 with fix. The issue in #3157 was that `pkg info` and `pkg search`, undocumented in man pages, seem to handle things differently if no packages match the pattern string. `pkg search` gives an error "No packages match [$pkgs]", whereas `pkg search` doesn't give an error. I didn't come across this because it's not stated in the man pages for pkg info, and because I tested it with a bare install but at least one pkg, while @NYOB used it on a bare install. The fix which I've tested and seems to work nicely, is to test using `pkg info -e` whether the pkg info call will hit a "no packages exist" issue or not. If `pkg info -e` returns 0 then it's safe as there's at least one matching pkg (any other errors are allowed to occur and be detected as usual). If it returns anything else, then there's no matching pkgs, so the main `pkg info` is skipped leaving $out and other variables at the correct values they need anyway, showing a null match/none found. For details of the underlying issue being fixed, and the issue that this resubmit fixes, see the original PR.
* Revert "get_pkg_info() fallback using pkg info if no local copy of repo catalog"Renato Botelho2017-01-101-27/+6
| | | | This reverts commit e47af756de79d4e8b0356cf22f72f62f09e9ad7d.
* get_pkg_info() fallback using pkg info if no local copy of repo catalogstilez2017-01-051-6/+27
| | | | | | | | | | | | | | | | | | | *Current behaviour* At the moment, get_pkg_info() is used to get all information on packages. The parameter _$local_only_ is set to request info directly from the local copy of the repo catalog (using -U) without requesting the remote repo catalog or updating the local copy from the remote repo catalog. If the calling code wants only installed pkgs, it filters the returned list of pkgs looking for _$pkg['installed'] == true_. There's a couple of problems with this method as it stands, due to the behaviour of pkg search -U. 1. When the remote catalog is requested and the request failed, the local copy is also deleted. If this happens, then pkg search returns an error even with -U, so even if all we wanted was to know from get_pkg_info() was the names of locally installed packages, it can't be used for this (even though this info doesn't need access to a remote repo catalog) 2. This behaviour, and the use of get_pkg_info() as the main method to get a list of installed pfSense packages and their data, means that any time we don't have a network connection or for any reason get_pkg_info() fails to access the repo catalog remotely, we become blocked from *any* inquiry, lookup, listing, or action on *all* optional packages, even if our desired action wouldn't need remote access to complete. We remain unable to do these things until remote repo access is obtained again and a catalog copy can be re-acquired. 3. This also means that nothing to do with getting installed package information or removal can occur offline either. *Change made* It's likely that when code explicitly requests $local_only, it isn't expecting or requiring the local copy to be up to date. So I've modified the code as follows: 1. New optional parameter $installed_only to explicitly request installed pkg info only (faster if we know that no remote request will be needed) 2. If $local_only is set and pkg search failed, retry falling back to pkg info to at least provide info on matching installed packages. This is probably more helpful than returning an error, as the assumption with $local_only is not "latest data in repo" so no harm done, and it allows pkg code to at least operate on local pkgs at all times, if not other pkgs in the repo.
* Populate the HTTP_PROXY_AUTH env var. Ticket #6949jim-p2016-12-071-0/+4
|
* Deprecate nanobsd platform and remove all conditionals that uses itRenato Botelho2016-10-121-2/+1
|
* Remove all calls to conf_mount_r* functionsRenato Botelho2016-10-121-13/+0
|
* Merge pull request #3156 from stilez/patch-43Renato Botelho2016-10-121-2/+2
|\
| * Remove unused arg in get_pkg_info()stilez2016-09-251-2/+2
| | | | | | The 2nd argument ($info) isn't used in that function, and doesn't seem to be used anywhere else in the codebase.
* | Create pkg.conf with ABI settingsRenato Botelho2016-10-101-0/+15
|/
* Move copyright from ESF to NetgateRenato Botelho2016-09-061-1/+1
|
* Protect package_reinstall_all()NewEraCracker2016-08-121-0/+3
| | | | If one restores a config.xml without packages, there will be a warning about invalid argument supplied for foreach(). This commit fixes the problem.
* Move to Apache License 2.0Renato Botelho2016-07-151-41/+9
|
* Review license / copyright on all files (1st round)Renato Botelho2016-07-141-41/+39
|
* Add missing -R parameter to pkg callRenato Botelho2016-07-061-1/+1
|
* Implement pkg_valid_name()Renato Botelho2016-06-081-0/+8
|
* Fix package_reinstall_all post-upgrade when packages have been removed in ↵Chris Buechler2016-05-121-5/+5
| | | | pre_upgrade. Ticket #6137
* Only execute remote search operation on first call of get_pkg_info(), this ↵Renato Botelho2016-05-111-0/+18
| | | | should fix #6177
* Workaound fixes #6320Stephen Beaver2016-05-071-3/+2
|
* Fix extrat return statementStephen Beaver2016-04-291-1/+0
|
* Fix #6137:Renato Botelho2016-04-291-11/+18
| | | | | | | - Uninstall all packages on current system before upgrade using pre_upgrade_command script - Create a file containing all packages previously installed and reinstall them on first boot after upgrade
* Test for internet connection 3 times trying to reinstall packages after ↵Renato Botelho2016-04-291-1/+9
| | | | upgrade or config restore. Fixes #6180
* Reduce values of FETCH_TIMEOUT and FETCH_RETRY to help ticket #6177Renato Botelho2016-04-271-1/+3
|
* Setup HTTP_PROXY environment variable for pkg when it's called from the GUI ↵jim-p2016-04-191-0/+8
| | | | and also for pfSense-upgrade
* Rework the way repo packages workRenato Botelho2016-04-051-18/+42
| | | | | | | | - Distribute only a single pfSense-repo package containing all templates - Create a symlink pointing to selected repo - Do not limit it only to pfSense-repo and pfSense-repo-devel (cherry picked from commit a90f1c9b12c4d31ea845fa04188e599ba28dbaf1)
* Remove workaround introduced in a2febf9a0. It reduces download timeout to ↵Renato Botelho2016-03-161-14/+1
| | | | 10s and break update from 2.2 to 2.3
* Add an option to define extra env vars to pkg_call() and pkg_exec()Renato Botelho2016-03-161-5/+9
|
* pkg-utils typo in commentPhil Davis2016-03-041-1/+1
|
OpenPOWER on IntegriCloud