Hello community, here is the log from the commit of package cantata for openSUSE:Factory checked in at 2020-03-17 13:09:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cantata (Old) and /work/SRC/openSUSE:Factory/.cantata.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cantata" Tue Mar 17 13:09:08 2020 rev:15 rq:785572 version:2.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/cantata/cantata.changes 2020-03-11 18:50:13.231537367 +0100 +++ /work/SRC/openSUSE:Factory/.cantata.new.3160/cantata.changes 2020-03-17 13:09:14.825757584 +0100 @@ -1,0 +2,10 @@ +Mon Mar 16 10:02:48 UTC 2020 - Christophe Giboudeaux <christo...@krop.fr> + +- Add upstream patch: + * 0001-Correctly-handle-changing-Basic-mode-music-folder.patch + (gh#CDrummond/cantata#1575) +- Use %cmake_build +- Drop obsolete conditions +- Run spec-cleaner + +------------------------------------------------------------------- New: ---- 0001-Correctly-handle-changing-Basic-mode-music-folder.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cantata.spec ++++++ --- /var/tmp/diff_new_pack.nKGfQ6/_old 2020-03-17 13:09:15.897758407 +0100 +++ /var/tmp/diff_new_pack.nKGfQ6/_new 2020-03-17 13:09:15.901758410 +0100 @@ -29,8 +29,11 @@ # PATCH-FIX-UPSTREAM: [PATCH] Correctly set 'storeLyricsInMpdDir' config item, UI was # setting wrong config item. Cantatan issue #1576 Patch1: correct-path-saved-lyrics.patch +# PATCH-FIX-UPSTREAM +Patch2: 0001-Correctly-handle-changing-Basic-mode-music-folder.patch BuildRequires: fdupes BuildRequires: media-player-info +BuildRequires: pkgconfig BuildRequires: cmake(Qt5LinguistTools) BuildRequires: pkgconfig(Qt5Concurrent) BuildRequires: pkgconfig(Qt5Core) @@ -56,15 +59,13 @@ BuildRequires: pkgconfig(taglib-extras) BuildRequires: pkgconfig(udisks2) BuildRequires: pkgconfig(zlib) +Requires: media-player-info Requires(post): hicolor-icon-theme Requires(post): update-desktop-files Requires(postun): hicolor-icon-theme Requires(postun): update-desktop-files -Requires: media-player-info -Recommends: mpd Recommends: %{name}-lang = %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build - +Recommends: mpd %lang_package %description @@ -97,35 +98,23 @@ information, please refer to the main README. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 +%autosetup -p1 %build %cmake -DENABLE_REMOTE_DEVICES=OFF \ -DENABLE_CATEGORIZED_VIEW=OFF -%make_jobs +%cmake_build %install %cmake_install %suse_update_desktop_file %{name} -%find_lang %name --without-kde --with-qt --all-name --without-mo +%find_lang %{name} --without-kde --with-qt --all-name --without-mo %fdupes %{buildroot} -%if 0%{?suse_version} < 1500 -%post -%desktop_database_post -%icon_theme_cache_post - -%postun -%desktop_database_postun -%icon_theme_cache_postun -%endif - %files -%defattr(-,root,root) +%license LICENSE %{_bindir}/%{name} %{_libexecdir}/%{name}/ %{_datadir}/%{name} @@ -133,14 +122,8 @@ %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/ %doc AUTHORS ChangeLog README README.md TODO -%if 0%{?suse_version} < 1500 -%doc LICENSE -%else -%license LICENSE -%endif %files lang -f %{name}.lang -%defattr(-,root,root) %dir %{_datadir}/%{name}/translations %changelog ++++++ 0001-Correctly-handle-changing-Basic-mode-music-folder.patch ++++++ >From 72729bb424ddeddfba452983d6e6211adf6e9a86 Mon Sep 17 00:00:00 2001 From: Craig Drummond <craig.p.drumm...@gmail.com> Date: Sat, 29 Feb 2020 08:26:57 +0000 Subject: [PATCH] - Correctly handle changing 'Basic' mode music folder. - When stopping 'Basic' mode MPD instance, send SIGKILL. Closes #1575 --- CMakeLists.txt | 2 +- ChangeLog | 5 +++++ gui/serversettings.cpp | 1 + mpd-interface/mpduser.cpp | 23 +++++++++++++++++------ 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a84decc7..0a8c4705 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Qt Client for MPD") set(CPACK_SOURCE_GENERATOR "TBZ2") set(CPACK_PACKAGE_VERSION_MAJOR "2") set(CPACK_PACKAGE_VERSION_MINOR "4") -set(CPACK_PACKAGE_VERSION_PATCH "1") +set(CPACK_PACKAGE_VERSION_PATCH "2") set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set(CPACK_PACKAGE_VERSION_SPIN "") # Use ".$number" - e.g. ".1" set(CPACK_PACKAGE_CONTACT "Craig Drummond <craig.p.drumm...@gmail.com>") diff --git a/ChangeLog b/ChangeLog index 30ed1051..a26f41bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2.4.2 +----- +1. Correctly handle changing 'Basic' mode music folder. +2. When stopping 'Basic' mode MPD instance, send SIGKILL. + 2.4.1 ----- 1. Re-enable custom playqueue background. This is broken for 5.12, but that's a diff --git a/gui/serversettings.cpp b/gui/serversettings.cpp index 558d2c61..840dce44 100644 --- a/gui/serversettings.cpp +++ b/gui/serversettings.cpp @@ -299,6 +299,7 @@ void ServerSettings::add() basicDir->setText(dir); MPDUser::self()->setMusicFolder(dir); combo->addItem(MPDUser::translatedName()); + haveBasicCollection = true; } #endif removeButton->setEnabled(combo->count()>1); diff --git a/mpd-interface/mpduser.cpp b/mpd-interface/mpduser.cpp index b9fac5ac..4cf56746 100644 --- a/mpd-interface/mpduser.cpp +++ b/mpd-interface/mpduser.cpp @@ -134,6 +134,11 @@ void MPDUser::setMusicFolder(const QString &folder) } init(true); + bool mpdRunning = isRunning(); + if (mpdRunning) { + controlMpd(true); + } + QFile cfgFile(Utils::dataDir(constDir, true)+constConfigFile); QStringList lines; if (cfgFile.open(QIODevice::ReadOnly|QIODevice::Text)) { @@ -145,22 +150,22 @@ void MPDUser::setMusicFolder(const QString &folder) lines.append(line); } } + cfgFile.close(); } if (!lines.isEmpty()) { - cfgFile.close(); if (cfgFile.open(QIODevice::WriteOnly|QIODevice::Text)) { QTextStream out(&cfgFile); for (const QString &line: lines) { out << line; } + cfgFile.close(); } } det.dir=folder; det.setDirReadable(); - if (0!=getPid()) { - controlMpd(true); // Stop - controlMpd(false); // Start + if (mpdRunning) { + controlMpd(false); } } @@ -334,14 +339,20 @@ int MPDUser::getPid() bool MPDUser::controlMpd(bool stop) { + if (stop) { + int pid = getPid(); + ::kill(pid, SIGKILL); + return !isRunning(); + } + QString confFile=Utils::dataDir(constDir, true)+constConfigFile; if (!QFile::exists(confFile)) { return false; } QStringList args=QStringList() << confFile; - if (stop) { + /*if (stop) { args+="--kill"; - } else { + } else*/ { // Ensure cache dir exists before starting MPD Utils::cacheDir(constDir, true); if (!pidFileName.isEmpty() && QFile::exists(pidFileName)) { -- 2.25.1