From 34846a664454bf001189a1be23d6d8bea0119efc Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 23 Aug 2017 04:35:21 -0400 Subject: [PATCH 1/5] Bump Calamares version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3138e198d2..66e95a503e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,7 +131,7 @@ set( CALAMARES_TRANSLATION_LANGUAGES ar ast bg ca cs_CZ da de el en en_GB es_MX ### Bump version here set( CALAMARES_VERSION_MAJOR 3 ) set( CALAMARES_VERSION_MINOR 1 ) -set( CALAMARES_VERSION_PATCH 1 ) +set( CALAMARES_VERSION_PATCH 2 ) set( CALAMARES_VERSION_RC 0 ) set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} ) From 2c81fceacbac2042e24ef87f6f152a6bbede5f81 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 23 Aug 2017 04:59:04 -0400 Subject: [PATCH 2/5] Python: KeyError because pretty_name may not exist --- src/libcalamares/PythonJob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcalamares/PythonJob.cpp b/src/libcalamares/PythonJob.cpp index 613f0f7abb..1a8a9701aa 100644 --- a/src/libcalamares/PythonJob.cpp +++ b/src/libcalamares/PythonJob.cpp @@ -310,7 +310,7 @@ PythonJob::exec() scriptNamespace ); bp::object entryPoint = scriptNamespace[ "run" ]; - bp::object prettyNameFunc = scriptNamespace[ "pretty_name" ]; + bp::object prettyNameFunc = bp::getattr(scriptNamespace, "pretty_name", bp::object()); cDebug() << "Job file" << scriptFI.absoluteFilePath(); if ( !prettyNameFunc.is_none() ) From 89c2c8a76e6f847b2f6c20c593116d864c1882af Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 23 Aug 2017 05:25:07 -0400 Subject: [PATCH 3/5] Suppress success-notification on failure --- src/modules/finished/FinishedViewStep.cpp | 18 +++++++++++++++++- src/modules/finished/FinishedViewStep.h | 5 +++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/modules/finished/FinishedViewStep.cpp b/src/modules/finished/FinishedViewStep.cpp index 2dfc1d0f69..8017a739ce 100644 --- a/src/modules/finished/FinishedViewStep.cpp +++ b/src/modules/finished/FinishedViewStep.cpp @@ -33,11 +33,15 @@ FinishedViewStep::FinishedViewStep( QObject* parent ) : Calamares::ViewStep( parent ) , m_widget( new FinishedPage() ) + , installFailed( false ) { cDebug() << "FinishedViewStep()"; - connect( Calamares::JobQueue::instance(), &Calamares::JobQueue::failed, + auto jq = Calamares::JobQueue::instance(); + connect( jq, &Calamares::JobQueue::failed, m_widget, &FinishedPage::onInstallationFailed ); + connect( jq, &Calamares::JobQueue::failed, + this, &FinishedViewStep::onInstallationFailed ); emit nextStatusChanged( true ); } @@ -107,6 +111,11 @@ FinishedViewStep::isAtEnd() const void FinishedViewStep::sendNotification() { + // If the installation failed, don't send notification popup; + // there's a (modal) dialog popped up with the failure notice. + if (installFailed) + return; + QDBusInterface notify( "org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications" ); if ( notify.isValid() ) { @@ -145,6 +154,13 @@ FinishedViewStep::jobs() const return QList< Calamares::job_ptr >(); } +void +FinishedViewStep::onInstallationFailed( const QString& message, const QString& details ) +{ + Q_UNUSED(message); + Q_UNUSED(details); + installFailed = true; +} void FinishedViewStep::setConfigurationMap( const QVariantMap& configurationMap ) diff --git a/src/modules/finished/FinishedViewStep.h b/src/modules/finished/FinishedViewStep.h index 075183f994..cb36560461 100644 --- a/src/modules/finished/FinishedViewStep.h +++ b/src/modules/finished/FinishedViewStep.h @@ -55,6 +55,9 @@ class PLUGINDLLEXPORT FinishedViewStep : public Calamares::ViewStep void setConfigurationMap( const QVariantMap& configurationMap ) override; +public slots: + void onInstallationFailed( const QString& message, const QString& details ); + private: FinishedPage* m_widget; @@ -63,6 +66,8 @@ class PLUGINDLLEXPORT FinishedViewStep : public Calamares::ViewStep * send a desktop notification via DBus that the install is done. */ void sendNotification(); + + bool installFailed; }; CALAMARES_PLUGIN_FACTORY_DECLARATION( FinishedViewStepFactory ) From 54660fda5843427d2a587f2b6d7cd2cb4027eb21 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 23 Aug 2017 05:31:41 -0400 Subject: [PATCH 4/5] Notes on bumping version numbers --- hacking/RELEASE.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hacking/RELEASE.md b/hacking/RELEASE.md index 0d41c5018d..d462ae47b3 100644 --- a/hacking/RELEASE.md +++ b/hacking/RELEASE.md @@ -24,6 +24,9 @@ The Calamares release process [transifex]: https://www.transifex.com/calamares/calamares/dashboard/ #### (1) Preparation + +* Bump version in `CMakeLists.txt`, *CALAMARES_VERSION* variables, and set + RC to a non-zero value (e.g. doing -rc1, -rc2, ...). Push that. * Check `README.md` and everything in `hacking`, make sure it's all still relevant. Run `hacking/calamaresstyle` to check the C++ code style. Python code is checked as part of the Travis CI builds. @@ -38,8 +41,6 @@ The Calamares release process * Update the list of enabled translation languages in `CMakeLists.txt`. Check the [translation site][transifex] for the list of languages with fairly complete translations. -* Bump version in `CMakeLists.txt`, *CALAMARES_VERSION* variables, and set - RC to a non-zero value (e.g. doing -rc1, -rc2, ...). Push that. #### (2) Tarball * Create tarball: `git-archive-all -v calamares-1.1-rc1.tar.gz` . Double check @@ -47,6 +48,7 @@ The Calamares release process * Test tarball. #### (3) Tag +* Set RC to zero in `CMakeLists.txt` if this is the actual release. * `git tag -s v1.1.0` Make sure the signing key is known in GitHub, so that the tag is shown as a verified tag. Do not sign -rc tags. * Generate MD5 and SHA256 checksums. @@ -59,5 +61,5 @@ The Calamares release process * Update download page. * Publish release article on `calamares.io`. * Publicize on social networks. -* Update release date on JIRA. +* Close associated milestone on GitHub if this is the actual release. * Publish blog post. From 2362a336134a05a6338ac4215a40de3226be0282 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 23 Aug 2017 06:43:37 -0400 Subject: [PATCH 5/5] Bump version numbers (again!) in preparation for next week's release --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66e95a503e..8358060ba0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,8 +131,8 @@ set( CALAMARES_TRANSLATION_LANGUAGES ar ast bg ca cs_CZ da de el en en_GB es_MX ### Bump version here set( CALAMARES_VERSION_MAJOR 3 ) set( CALAMARES_VERSION_MINOR 1 ) -set( CALAMARES_VERSION_PATCH 2 ) -set( CALAMARES_VERSION_RC 0 ) +set( CALAMARES_VERSION_PATCH 4 ) +set( CALAMARES_VERSION_RC 1 ) set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} ) set( CALAMARES_VERSION_SHORT "${CALAMARES_VERSION}" )