SoftwareUpdater version 1.0.1
Changes: -Bug fix in output when no network is detected on x64. Fixes #13345 -Do not display a final notification if SoftwareUpdater is front most window (redundant since the same message is displayed in window) -Remove the "Continue anyway" prompt when no network detected -Implement the --verbose command option: For update and full-sync modes, only displays Terminal output when --verbose is used For check mode show output on notifications -Replace the "Show more details" popup menu with a check box -Replace fprintf commands with other non-formatting commands if no formatting is needed (thanks Axel) -Display a dialog and button to open the Repositories preflet if no repositories are enabled -Do not display confirmation to quit until after downloads have started
This commit is contained in:
@@ -23,10 +23,12 @@ using namespace BPackageKit;
|
||||
using namespace BPackageKit::BManager::BPrivate;
|
||||
|
||||
|
||||
UpdateAction::UpdateAction()
|
||||
UpdateAction::UpdateAction(bool verbose)
|
||||
:
|
||||
fVerbose(verbose)
|
||||
{
|
||||
fUpdateManager = new(std::nothrow)
|
||||
UpdateManager(B_PACKAGE_INSTALLATION_LOCATION_SYSTEM);
|
||||
UpdateManager(B_PACKAGE_INSTALLATION_LOCATION_SYSTEM, verbose);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +58,7 @@ UpdateAction::Perform(update_type action_request)
|
||||
fUpdateManager->Init(BPackageManager::B_ADD_INSTALLED_REPOSITORIES
|
||||
| BPackageManager::B_ADD_REMOTE_REPOSITORIES
|
||||
| BPackageManager::B_REFRESH_REPOSITORIES);
|
||||
fUpdateManager->CheckRepositories();
|
||||
|
||||
// fUpdateManager->SetDebugLevel(1);
|
||||
if(action == UPDATE) {
|
||||
@@ -75,21 +78,24 @@ UpdateAction::Perform(update_type action_request)
|
||||
ex.Message());
|
||||
return ex.Error();
|
||||
} catch (BAbortedByUserException ex) {
|
||||
fprintf(stderr, "Updates aborted by user: %s\n",
|
||||
ex.Message().String());
|
||||
if (fVerbose)
|
||||
fprintf(stderr, "Updates aborted by user: %s\n",
|
||||
ex.Message().String());
|
||||
// No need for a final message since user initiated cancel request
|
||||
be_app->PostMessage(kMsgFinalQuit);
|
||||
return B_OK;
|
||||
} catch (BNothingToDoException ex) {
|
||||
fprintf(stderr, "Nothing to do while updating packages : %s\n",
|
||||
ex.Message().String());
|
||||
if (fVerbose)
|
||||
fprintf(stderr, "Nothing to do while updating packages : %s\n",
|
||||
ex.Message().String());
|
||||
fUpdateManager->FinalUpdate(B_TRANSLATE("No updates available"),
|
||||
B_TRANSLATE("There were no updates found."));
|
||||
return B_OK;
|
||||
} catch (BException ex) {
|
||||
fprintf(stderr, B_TRANSLATE(
|
||||
if (fVerbose)
|
||||
fprintf(stderr, B_TRANSLATE(
|
||||
"Exception occurred while updating packages : %s\n"),
|
||||
ex.Message().String());
|
||||
ex.Message().String());
|
||||
fUpdateManager->FinalUpdate(B_TRANSLATE("Updates did not complete"),
|
||||
ex.Message());
|
||||
return B_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user