Author: benjimanw Date: Sat Mar 29 12:07:14 2008 New Revision: 45867
URL: http://svn.opensuse.org/viewcvs/yast?rev=45867&view=rev Log: Fixed error reporting; Switched to Slideshow.ycp for installation progress instead of individual popups.
Modified: trunk/metapackage/VERSION trunk/metapackage/package/yast2-metapackage-handler.changes trunk/metapackage/src/OneClickInstallWorker.ycp trunk/metapackage/src/OneClickInstallWorkerFunctions.ycp
Modified: trunk/metapackage/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/metapackage/VERSION?rev=45867&... ============================================================================== --- trunk/metapackage/VERSION (original) +++ trunk/metapackage/VERSION Sat Mar 29 12:07:14 2008 @@ -1 +1 @@ -0.8.0 +0.8.1
Modified: trunk/metapackage/package/yast2-metapackage-handler.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/metapackage/package/yast2-metapac... ============================================================================== --- trunk/metapackage/package/yast2-metapackage-handler.changes (original) +++ trunk/metapackage/package/yast2-metapackage-handler.changes Sat Mar 29 12:07:14 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Sat Mar 29 12:00:00 GMT 2008 - benji@opensuse.org + +- Fix error stage reporting. +- Switch to slideshow for installation progress, instead of popups. + +------------------------------------------------------------------- Tue Mar 18 17:00:00 GMT 2008 - benji@opensuse.org
- Command line Support.
Modified: trunk/metapackage/src/OneClickInstallWorker.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/metapackage/src/OneClickInstallWo... ============================================================================== --- trunk/metapackage/src/OneClickInstallWorker.ycp (original) +++ trunk/metapackage/src/OneClickInstallWorker.ycp Sat Mar 29 12:07:14 2008 @@ -7,6 +7,9 @@ import "Popup"; include "packager/inst_source_dialogs.ycp"; import "PackageCallbacks"; + import "SlideShow"; + import "SlideShowCallbacks"; + import "PackageInstallation"; import "SourceManager"; import "Progress";
@@ -23,61 +26,73 @@ OneClickInstall::FromXML(xmlFileName);
boolean success = true; - - //try and add the repositories - //run this anyway so that source cache is initialised. - //if (OneClickInstall::HaveRepositoriesToInstall()) - //{ - success = OneClickInstallWorkerFunctions::AddRepositories(OneClickInstall::GetRequiredRepositories()); - //} + + success = OneClickInstallWorkerFunctions::AddRepositories(OneClickInstall::GetRequiredRepositories()); + if (!success) { OneClickInstallWorkerResponse::SetFailureStage("Adding Repositories"); OneClickInstallWorkerResponse::SetErrorMessage(_("An error occurred while attempting to subscribe to the required repositories. Please review the yast2 logs for more information.")); }
- //Remove any removals - if (success && OneClickInstall::HaveRemovalsToInstall()) - { - success = OneClickInstallWorkerFunctions::RemovePackages(OneClickInstall::GetRequiredRemoveSoftware()); - } - if (!success) - { - OneClickInstallWorkerResponse::SetFailureStage("Removing Packages"); - OneClickInstallWorkerResponse::SetErrorMessage(_("An error occurred while attempting to remove the specified packages. Please review the yast2 logs for more information.")); - }
- //if that was successful now try and install the patterns - if (success && OneClickInstall::HavePatternsToInstall()) - { - success = OneClickInstallWorkerFunctions::InstallPatterns(OneClickInstall::GetRequiredPatterns()); - } - if (!success) + if (success) { - OneClickInstallWorkerResponse::SetFailureStage("Installing Patterns"); - OneClickInstallWorkerResponse::SetErrorMessage(_("An error occurred while attempting to install the specified patterns. Please review the yast2 logs for more information.")); - } + SlideShow::SetLanguage (UI::GetLanguage(true)); + SlideShow::InitPkgData(true); + SlideShow::OpenSlideShowDialog(); + PackageInstallation::CommitPackages(0,0); + + //Remove any removals + if (success && OneClickInstall::HaveRemovalsToInstall()) + { + success = OneClickInstallWorkerFunctions::RemovePackages(OneClickInstall::GetRequiredRemoveSoftware()); + + if (!success) + { + OneClickInstallWorkerResponse::SetFailureStage("Removing Packages"); + OneClickInstallWorkerResponse::SetErrorMessage(_("An error occurred while attempting to remove the specified packages. Please review the yast2 logs for more information.")); + } + } + + + //if that was successful now try and install the patterns + if (success && OneClickInstall::HavePatternsToInstall()) + { + success = OneClickInstallWorkerFunctions::InstallPatterns(OneClickInstall::GetRequiredPatterns()); + + if (!success) + { + OneClickInstallWorkerResponse::SetFailureStage("Installing Patterns"); + OneClickInstallWorkerResponse::SetErrorMessage(_("An error occurred while attempting to install the specified patterns. Please review the yast2 logs for more information.")); + } + } + + + //if that was successful now try and install the packages + if (success && OneClickInstall::HavePackagesToInstall()) + { + success = OneClickInstallWorkerFunctions::InstallPackages(OneClickInstall::GetRequiredPackages()); + if (!success) + { + OneClickInstallWorkerResponse::SetFailureStage("Installing Packages"); + OneClickInstallWorkerResponse::SetErrorMessage(_("An error occurred while attempting to install the specified packages. Please review the yast2 logs for more information.")); + } + } + + SlideShow::CloseSlideShowDialog();
- //if that was successful now try and install the packages - if (success && OneClickInstall::HavePackagesToInstall()) - { - success = OneClickInstallWorkerFunctions::InstallPackages(OneClickInstall::GetRequiredPackages()); - } - if (!success) - { - OneClickInstallWorkerResponse::SetFailureStage("Installing Packages"); - OneClickInstallWorkerResponse::SetErrorMessage(_("An error occurred while attempting to install the specified packages. Please review the yast2 logs for more information.")); }
//If we don't want to remain subscribed, remove the repositories that were added for installation. if (OneClickInstall::HaveRepositoriesToInstall() && !OneClickInstall::GetRemainSubscribed()) { success = OneClickInstallWorkerFunctions::RemoveAddedRepositories(); - } - if (!success) - { - OneClickInstallWorkerResponse::SetFailureStage("Removing temporarily installed repositories."); - OneClickInstallWorkerResponse::SetErrorMessage(_("An error occurred while attempting to unsubscribe from the repositories that were used to perform the installation. You can remove them manually in YaST > Software Repositories. Please review the yast2 logs for more information.")); + if (!success) + { + OneClickInstallWorkerResponse::SetFailureStage("Removing temporarily installed repositories."); + OneClickInstallWorkerResponse::SetErrorMessage(_("An error occurred while attempting to unsubscribe from the repositories that were used to perform the installation. You can remove them manually in YaST > Software Repositories. Please review the yast2 logs for more information.")); + } }
OneClickInstallWorkerResponse::SetSuccess(success);
Modified: trunk/metapackage/src/OneClickInstallWorkerFunctions.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/metapackage/src/OneClickInstallWo... ============================================================================== --- trunk/metapackage/src/OneClickInstallWorkerFunctions.ycp (original) +++ trunk/metapackage/src/OneClickInstallWorkerFunctions.ycp Sat Mar 29 12:07:14 2008 @@ -84,6 +84,7 @@ **/ global boolean AddRepositories(list<string> repositories) { + boolean addRepoSuccess = true; print(_("Loading Package Management"));
list<string> dedupedRepos = DeDupe(repositories); @@ -113,6 +114,7 @@ { OneClickInstallWorkerResponse::AddFailedRepository(new_url); again = false; + addRepoSuccess = false; return false; } } @@ -126,7 +128,7 @@
} }); - return true; + return addRepoSuccess; }
/**
yast-commit@lists.opensuse.org