Project

General

Profile

Actions

Bug #4143

closed

After firmware upgrade it keeps saying "Packages are currently being reinstalled in the background." for no apparent reason.

Added by Pi Ba over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Category:
Package System
Target version:
Start date:
12/24/2014
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:
All

Description

After firmware upgrade it keeps saying "Packages are currently being reinstalled in the background." for no apparent reason.

I believe this is for example the case when a package requires some .inc file but does not include it properly, that can stop/crash php when going through the firmware upgrade procedure while reinstalling packages.

Adding some error logging can help find the reason this kind of issues.

I think this for example this would help find such issues: https://github.com/pfsense/pfsense/pull/1386 , if some tweaking is needed to log less 'noise' thats possible, though avoiding 'warnings' about deprecated and bad code might not be bad in the long run.. At least it would log the errors in most these cases.

Actions #1

Updated by Chris Buechler over 9 years ago

  • Category changed from Logging to Package System
  • Status changed from New to Confirmed
  • Affected Version changed from 2.1.5 to All

there have always been some circumstances with some packages where that happens. additional comment on the pull request.

Actions #2

Updated by Jim Thompson over 9 years ago

  • Assignee set to Chris Buechler
Actions #3

Updated by Pi Ba over 9 years ago

FYI, i did send a new pull request https://github.com/pfsense/pfsense/pull/1403 as the other one was closed.

Actions #4

Updated by Chris Buechler over 9 years ago

  • Status changed from Confirmed to Resolved

the original had a couple issues that I noted as comments in the comment, and Renato added one there as well. I implemented more or less what you submitted, just cleaned up a bit to reflect those comments. Thanks!

This should be resolved.

Actions #5

Updated by Pi Ba over 9 years ago

The commit that was done been commented out in the code now.. Which would reopen this issue.

Would it be an option to allow for logging ($error['type'] == E_ERROR) for 2.2 , that should cut down on the amount of not so important logging generated.. and still log why a crashing package installation (for example 'tinc') happens?

Can reproduce the lack of error logging that example by running from a dev-php-shell on the console/ssh this code:

include_once('pkg-utils.inc');
$pkgtodo['name'] = 'tinc';
log_error(gettext("Uninstalling package") . " {$pkgtodo['name']}");
uninstall_package($pkgtodo['name']);
log_error(gettext("Finished uninstalling package") . " {$pkgtodo['name']}");
log_error(gettext("Reinstalling package") . " {$pkgtodo['name']}");
install_package($pkgtodo['name'], '', true);
log_error(gettext("Finished installing package") . " {$pkgtodo['name']}");
exec

Or by installing 'tinc' package from gui and performing a firmware upgrade, during the upgrade it fails..

Actions

Also available in: Atom PDF