From fa596ba859f7e20dbf908382d5c36355f03793d6 Mon Sep 17 00:00:00 2001 From: Björn Esser Date: May 03 2017 17:11:00 +0000 Subject: Updated to snapshot adding dnfdragora-updater --- diff --git a/dnfdragora-1.0.1-fix_crash_updater.patch b/dnfdragora-1.0.1-fix_crash_updater.patch new file mode 100644 index 0000000..e4534ee --- /dev/null +++ b/dnfdragora-1.0.1-fix_crash_updater.patch @@ -0,0 +1,60 @@ +From 61b76b3e4cdcff1a865e44676409045c6cb5a472 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Wed, 3 May 2017 18:35:17 +0200 +Subject: [PATCH] Fix to prevent updater from crashing + +--- + dnfdragora/ui.py | 11 +++++++---- + dnfdragora/updater.py | 4 ++-- + 2 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/dnfdragora/ui.py b/dnfdragora/ui.py +index 0060f38..b560320 100644 +--- a/dnfdragora/ui.py ++++ b/dnfdragora/ui.py +@@ -131,6 +131,8 @@ def __init__(self, options={}): + constructor + ''' + ++ self.running = True ++ self.loop_has_finished = False + self.options = options + self._progressBar = None + self.packageQueue = PackageQueue() +@@ -1069,7 +1071,7 @@ def handleevent(self): + """ + Event-handler for the maindialog + """ +- while True: ++ while self.running == True: + + event = self.dialog.waitForEvent() + +@@ -1235,8 +1237,9 @@ def handleevent(self): + # Save user prefs on exit + self.saveUserPreference() + ++ self.loop_has_finished = True + self.dialog.destroy() ++ self.backend.Unlock() + +- # next line seems to be a workaround to prevent the qt-app from crashing +- # see https://github.com/libyui/libyui-qt/issues/41 +- yui.YUILoader.deleteUI() ++ def quit(): ++ self.running = False +diff --git a/dnfdragora/updater.py b/dnfdragora/updater.py +index a46d7dd..fca8f41 100644 +--- a/dnfdragora/updater.py ++++ b/dnfdragora/updater.py +@@ -56,8 +56,8 @@ def __shutdown(self, *kwargs): + try: + self.__running = False + self.__updater.join() +- self.__main_gui.running = False +- while self.__main_gui.has_finished != True: ++ self.__main_gui.quit() ++ while self.__main_gui.loop_has_finished != True: + time.sleep(1) + self.__main_gui.backend.quit() + yui.YDialog.deleteAllDialogs() diff --git a/dnfdragora.spec b/dnfdragora.spec index ae44c63..6a4a157 100644 --- a/dnfdragora.spec +++ b/dnfdragora.spec @@ -1,10 +1,10 @@ # For release builds set to 1, for snapshots set to 0 -%global relbuild 1 +%global relbuild 0 %if !0%{?relbuild} -%global commit 3662635626599923d196e8b8a28fe8ec4510a17a +%global commit 368ee94cb7f04c168ea3cd5cbdea94730ce516cb %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global gitdate 20170411 +%global gitdate 20170503 %global git_ver -git%{gitdate}.%{shortcommit} %global git_rel .git%{gitdate}.%{shortcommit} %endif # !0%%{?relbuild} @@ -14,7 +14,7 @@ Name: dnfdragora Version: 1.0.1 -Release: 1%{?git_rel}%{?dist} +Release: 2%{?git_rel}%{?dist} Summary: DNF package-manager based on libYui abstraction License: GPLv3+ @@ -25,6 +25,8 @@ Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{version}%{?git_ver}.tar.gz %endif # 0%%{?relbuild} +Patch0: %{url}/pull/41.patch#/%{name}-1.0.1-fix_crash_updater.patch + BuildArch: noarch BuildRequires: cmake >= 3.4.0 @@ -59,6 +61,10 @@ using Qt 5, GTK+ 3, or ncurses interfaces. Summary: Meta-package to pull the needed dependencies for %{name} GUI-mode Requires: %{name} == %{version}-%{release} +Requires: libnotify +Requires: python3-pillow +Requires: python3-pystray +Requires: python3-sh # Yumex-DNF is dead. Let's use dnfdragora-gui as drop-in replacement. # See: https://pagure.io/fesco/issue/1690#comment-434558 @@ -135,21 +141,33 @@ fi %config(noreplace) %{_sysconfdir}/%{name}/%{name}.yaml %dir %{_sysconfdir}/%{name} %doc README.md TODO %{name}.yaml.example +%exclude %{python3_sitelib}/%{name}/updater.py +%exclude %{python3_sitelib}/%{name}/__pycache__/updater.cpython*.py? %license AUTHORS LICENSE %{_bindir}/%{name} %{_datadir}/appdata/*%{name}.appdata.xml -%{_datadir}/applications/*%{name}*.desktop +%{_datadir}/applications/*%{name}.desktop +%{_datadir}/applications/*%{name}-localinstall.desktop %{_datadir}/%{name} %{_datadir}/icons/hicolor/*/apps/%{name}* %{_mandir}/man5/%{name}*.5* %{_mandir}/man8/%{name}*.8* -%{python3_sitelib}/%{name} +%dir %{python3_sitelib}/%{name} +%{python3_sitelib}/%{name}/* + %files gui -# Empty meta-package. +%{_bindir}/%{name}-updater +%{_datadir}/applications/*%{name}-updater.desktop +%{_sysconfdir}/xdg/autostart/*%{name}*.desktop +%{python3_sitelib}/%{name}/updater.py +%{python3_sitelib}/%{name}/__pycache__/updater.cpython*.py? %changelog +* Wed May 03 2017 Björn Esser - 1.0.1-2.git20170503.368ee94 +- Updated to snapshot adding dnfdragora-updater + * Sat Apr 15 2017 Björn Esser - 1.0.1-1 - New upstream release diff --git a/sources b/sources index 93b4e2a..95c4108 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dnfdragora-1.0.1.tar.gz) = 8772651b0cbb1a2ce32560f45542a7dcb80e975d1e811440288b1badf183d5fba05846c80cb931e0e7961eb25582aa877a71277f11aeb73f345e64f4239b9f1d +SHA512 (dnfdragora-1.0.1-git20170503.368ee94.tar.gz) = f148c7b6d6e0becf3e341f4eb9473e3421c2054830ea9c85719025353605dd31a254e703b54b92c7866c0ba2d827351d6e57d57a13d7c8a20f863a435d210f73