provide directory /var/cache/PackgeKit/downloads
smartBackend.py: patched to raise correct exceptions, hopefully fixes pk lockups on errors [release 0.9.5-3mamba;Tue Aug 18 2015]
This commit is contained in:
parent
a8a3f07000
commit
da3742ddc4
@ -8,24 +8,21 @@
|
|||||||
#include <pk-backend.h>
|
#include <pk-backend.h>
|
||||||
#include <pk-backend-spawn.h>
|
#include <pk-backend-spawn.h>
|
||||||
|
|
||||||
@@ -492,6 +493,25 @@
|
@@ -492,6 +493,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+ * pk_backend_what_provides:
|
+ * pk_backend_what_provides:
|
||||||
+ */
|
+ */
|
||||||
+static void
|
+static void
|
||||||
+backend_what_provides (PkBackend *backend, PkBitfield filters, PkProvidesEnum provides, gchar **values)
|
+backend_what_provides (PkBackend *backend, PkBitfield filters, gchar **values)
|
||||||
+{
|
+{
|
||||||
+ gchar *search_tmp;
|
+ gchar *search_tmp;
|
||||||
+ gchar *filters_text;
|
+ gchar *filters_text;
|
||||||
+ const gchar *provides_text;
|
|
||||||
+
|
+
|
||||||
+ provides_text = pk_provides_enum_to_text (provides);
|
|
||||||
+ filters_text = pk_filter_bitfield_to_string (filters);
|
+ filters_text = pk_filter_bitfield_to_string (filters);
|
||||||
+ search_tmp = g_strjoinv ("&", values);
|
+ search_tmp = g_strjoinv ("&", values);
|
||||||
+ fprintf(stderr,"prova: %s\n", provides_text);
|
+ pk_backend_spawn_helper (spawn, BACKEND_FILE, "what-provides", filters_text, "any", search_tmp, NULL);
|
||||||
+ pk_backend_spawn_helper (spawn, BACKEND_FILE, "what-provides", filters_text, provides_text, search_tmp, NULL);
|
|
||||||
+ g_free (filters_text);
|
+ g_free (filters_text);
|
||||||
+ g_free (search_tmp);
|
+ g_free (search_tmp);
|
||||||
+}
|
+}
|
@ -0,0 +1,63 @@
|
|||||||
|
diff -Nru PackageKit-0.9.5.orig/backends/smart/smartBackend.py PackageKit-0.9.5/backends/smart/smartBackend.py
|
||||||
|
--- PackageKit-0.9.5.orig/backends/smart/smartBackend.py 2015-08-19 00:28:41.888881409 +0200
|
||||||
|
+++ PackageKit-0.9.5/backends/smart/smartBackend.py 2015-08-19 00:29:05.737801008 +0200
|
||||||
|
@@ -204,7 +204,10 @@
|
||||||
|
else:
|
||||||
|
self.status(STATUS_INSTALL)
|
||||||
|
self._packagesdict = trans.getChangeSet()
|
||||||
|
- self.ctrl.commitTransaction(trans, confirm=False)
|
||||||
|
+ try:
|
||||||
|
+ self.ctrl.commitTransaction(trans, confirm=False)
|
||||||
|
+ except smart.Error, e:
|
||||||
|
+ self.error(ERROR_PACKAGE_FAILED_TO_INSTALL, e, exit=False)
|
||||||
|
|
||||||
|
@needs_cache
|
||||||
|
def install_files(self, transaction_flags, paths):
|
||||||
|
@@ -230,7 +233,10 @@
|
||||||
|
else:
|
||||||
|
self.status(STATUS_INSTALL)
|
||||||
|
self._packagesdict = trans.getChangeSet()
|
||||||
|
- self.ctrl.commitTransaction(trans, confirm=False)
|
||||||
|
+ try:
|
||||||
|
+ self.ctrl.commitTransaction(trans, confirm=False)
|
||||||
|
+ except smart.Error, e:
|
||||||
|
+ self.error(ERROR_PACKAGE_FAILED_TO_INSTALL, e, exit=False)
|
||||||
|
|
||||||
|
@needs_cache
|
||||||
|
def remove_packages(self, transaction_flags, packageids, allow_deps, autoremove):
|
||||||
|
@@ -270,7 +276,10 @@
|
||||||
|
else:
|
||||||
|
self.status(STATUS_REMOVE)
|
||||||
|
self._packagesdict = trans.getChangeSet()
|
||||||
|
- self.ctrl.commitTransaction(trans, confirm=False)
|
||||||
|
+ try:
|
||||||
|
+ self.ctrl.commitTransaction(trans, confirm=False)
|
||||||
|
+ except smart.Error, e:
|
||||||
|
+ self.error(ERROR_PACKAGE_FAILED_TO_REMOVE, e, exit=False)
|
||||||
|
|
||||||
|
@needs_cache
|
||||||
|
def update_packages(self, transaction_flags, packageids):
|
||||||
|
@@ -299,7 +308,10 @@
|
||||||
|
else:
|
||||||
|
self.status(STATUS_UPDATE)
|
||||||
|
self._packagesdict = trans.getChangeSet()
|
||||||
|
- self.ctrl.commitTransaction(trans, confirm=False)
|
||||||
|
+ try:
|
||||||
|
+ self.ctrl.commitTransaction(trans, confirm=False)
|
||||||
|
+ except smart.Error, e:
|
||||||
|
+ self.error(ERROR_PACKAGE_FAILED_TO_INSTALL, e, exit=False)
|
||||||
|
|
||||||
|
@needs_cache
|
||||||
|
def download_packages(self, directory, packageids):
|
||||||
|
@@ -344,7 +356,10 @@
|
||||||
|
return
|
||||||
|
self.status(STATUS_UPDATE)
|
||||||
|
self._packagesdict = trans.getChangeSet()
|
||||||
|
- self.ctrl.commitTransaction(trans, confirm=False)
|
||||||
|
+ try:
|
||||||
|
+ self.ctrl.commitTransaction(trans, confirm=False)
|
||||||
|
+ except smart.Error, e:
|
||||||
|
+ self.error(ERROR_PACKAGE_FAILED_TO_INSTALL, e, exit=False)
|
||||||
|
|
||||||
|
@needs_cache
|
||||||
|
def get_updates(self, filters):
|
@ -1,6 +1,6 @@
|
|||||||
Name: PackageKit
|
Name: PackageKit
|
||||||
Version: 0.8.17
|
Version: 0.9.5
|
||||||
Release: 1mamba
|
Release: 3mamba
|
||||||
Summary: A system designed to make installing and updating software on your computer easier
|
Summary: A system designed to make installing and updating software on your computer easier
|
||||||
Group: System/Management
|
Group: System/Management
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
@ -11,7 +11,7 @@ Source: http://www.freedesktop.org/software/PackageKit/releases/PackageKi
|
|||||||
Patch0: %{name}-0.6.6-openmamba-groups.patch
|
Patch0: %{name}-0.6.6-openmamba-groups.patch
|
||||||
Patch1: %{name}-0.8.17-openmamba-Vendor.conf.patch
|
Patch1: %{name}-0.8.17-openmamba-Vendor.conf.patch
|
||||||
Patch2: %{name}-0.6.9-command_not_found_raise_timeout.patch
|
Patch2: %{name}-0.6.9-command_not_found_raise_timeout.patch
|
||||||
Patch3: %{name}-0.7.3-smart-what_provides.patch
|
Patch3: %{name}-0.9.1-smart-what_provides.patch
|
||||||
Patch4: %{name}-0.6.13-smartBackend_fix_best_package.patch
|
Patch4: %{name}-0.6.13-smartBackend_fix_best_package.patch
|
||||||
Patch5: %{name}-0.6.13-smartBackend_fix_Changelog.patch
|
Patch5: %{name}-0.6.13-smartBackend_fix_Changelog.patch
|
||||||
Patch6: %{name}-0.6.13-qt_fix_searchGroups.patch
|
Patch6: %{name}-0.6.13-qt_fix_searchGroups.patch
|
||||||
@ -21,6 +21,7 @@ Patch9: %{name}-0.6.21-xulrunner-7.patch
|
|||||||
Patch10: %{name}-0.6.21-revert_utf8_for_smart.patch
|
Patch10: %{name}-0.6.21-revert_utf8_for_smart.patch
|
||||||
Patch11: PackageKit-0.6.22-display_smart_errors_as_html.patch
|
Patch11: PackageKit-0.6.22-display_smart_errors_as_html.patch
|
||||||
Patch12: PackageKit-0.8.11-smartBackend-fix-remove-packages.patch
|
Patch12: PackageKit-0.8.11-smartBackend-fix-remove-packages.patch
|
||||||
|
Patch13: PackageKit-0.9.5-smartBackend-correctly-raise-exceptions.patch
|
||||||
License: GPL
|
License: GPL
|
||||||
## AUTOBUILDREQ-BEGIN
|
## AUTOBUILDREQ-BEGIN
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
@ -165,8 +166,9 @@ This package contains static libraries and header files need for development.
|
|||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
#%patch9 -p1
|
#%patch9 -p1
|
||||||
#%patch10 -p1
|
#%patch10 -p1
|
||||||
%patch11 -p1
|
#%patch11 -p1
|
||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
|
%patch13 -p1
|
||||||
#sed -i "s|/usr/bin/python$|/usr/bin/python%{python27_version}|" backends/smart/smartBackend.py
|
#sed -i "s|/usr/bin/python$|/usr/bin/python%{python27_version}|" backends/smart/smartBackend.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -209,7 +211,7 @@ rm -f %{buildroot}/var/lib/PackageKit/transactions.db
|
|||||||
%{_sysconfdir}/PackageKit/events/post-transaction.d/README
|
%{_sysconfdir}/PackageKit/events/post-transaction.d/README
|
||||||
%{_sysconfdir}/PackageKit/events/pre-transaction.d/README
|
%{_sysconfdir}/PackageKit/events/pre-transaction.d/README
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/packagekit-background
|
%config(noreplace) %{_sysconfdir}/sysconfig/packagekit-background
|
||||||
%{_bindir}/packagekit-bugreport.sh
|
#%{_bindir}/packagekit-bugreport.sh
|
||||||
%{_bindir}/pk-debuginfo-install
|
%{_bindir}/pk-debuginfo-install
|
||||||
%{_bindir}/pkcon
|
%{_bindir}/pkcon
|
||||||
#%{_bindir}/pkgenpack
|
#%{_bindir}/pkgenpack
|
||||||
@ -217,12 +219,13 @@ rm -f %{buildroot}/var/lib/PackageKit/transactions.db
|
|||||||
#%{_sbindir}/pk-device-rebind
|
#%{_sbindir}/pk-device-rebind
|
||||||
%dir %{_libdir}/packagekit-backend
|
%dir %{_libdir}/packagekit-backend
|
||||||
%{_libdir}/packagekit-backend/libpk_backend_*
|
%{_libdir}/packagekit-backend/libpk_backend_*
|
||||||
%dir %{_libdir}/packagekit-plugins
|
%dir %{_libdir}/packagekit-plugins-2
|
||||||
%{_libdir}/packagekit-plugins/libpk_plugin*
|
%{_libdir}/packagekit-plugins-2/libpk_plugin*
|
||||||
#%{_libdir}/pm-utils/sleep.d/95packagekit
|
#%{_libdir}/pm-utils/sleep.d/95packagekit
|
||||||
%{_libdir}/girepository-1.0/PackageKitPlugin-1.0.typelib
|
%{_libdir}/girepository-1.0/PackageKitPlugin-1.0.typelib
|
||||||
%{_unitdir}/packagekit.service
|
%{_unitdir}/packagekit.service
|
||||||
%{_unitdir}/packagekit-offline-update.service
|
%{_unitdir}/packagekit-offline-update.service
|
||||||
|
%{_libexecdir}/packagekit-direct
|
||||||
%{_libexecdir}/pk-clear-offline-update
|
%{_libexecdir}/pk-clear-offline-update
|
||||||
%{_libexecdir}/pk-offline-update
|
%{_libexecdir}/pk-offline-update
|
||||||
%{_libexecdir}/pk-trigger-offline-update
|
%{_libexecdir}/pk-trigger-offline-update
|
||||||
@ -241,6 +244,9 @@ rm -f %{buildroot}/var/lib/PackageKit/transactions.db
|
|||||||
%dir %{python_sitelib}/packagekit
|
%dir %{python_sitelib}/packagekit
|
||||||
%{python_sitelib}/packagekit/*
|
%{python_sitelib}/packagekit/*
|
||||||
%dir /var/lib/PackageKit
|
%dir /var/lib/PackageKit
|
||||||
|
%dir /var/cache/PackageKit
|
||||||
|
%dir /var/cache/PackageKit/downloads
|
||||||
|
%dir /var/cache/PackageKit/metadata
|
||||||
%{_mandir}/man1/pkcon.1*
|
%{_mandir}/man1/pkcon.1*
|
||||||
%{_mandir}/man1/pk-debuginfo-install.1*
|
%{_mandir}/man1/pk-debuginfo-install.1*
|
||||||
#%{_mandir}/man1/pk-device-rebind.1*
|
#%{_mandir}/man1/pk-device-rebind.1*
|
||||||
@ -258,10 +264,12 @@ rm -f %{buildroot}/var/lib/PackageKit/transactions.db
|
|||||||
%{_libdir}/gtk-2.0/modules/libpk-gtk-module.*
|
%{_libdir}/gtk-2.0/modules/libpk-gtk-module.*
|
||||||
|
|
||||||
%if "%{stage1}" != "1"
|
%if "%{stage1}" != "1"
|
||||||
|
%ifnarch arm
|
||||||
%files mozilla
|
%files mozilla
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/mozilla/plugins/packagekit-plugin.*
|
%{_libdir}/mozilla/plugins/packagekit-plugin.*
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
#%files qt2
|
#%files qt2
|
||||||
#%defattr(-,root,root)
|
#%defattr(-,root,root)
|
||||||
@ -301,9 +309,19 @@ rm -f %{buildroot}/var/lib/PackageKit/transactions.db
|
|||||||
%{_datadir}/gtk-doc/html/PackageKit
|
%{_datadir}/gtk-doc/html/PackageKit
|
||||||
%{_datadir}/gir-1.0/PackageKitPlugin-1.0.gir
|
%{_datadir}/gir-1.0/PackageKitPlugin-1.0.gir
|
||||||
%{_libdir}/pkgconfig/packagekit-plugin.pc
|
%{_libdir}/pkgconfig/packagekit-plugin.pc
|
||||||
#%doc ChangeLog NEWS README TODO
|
%doc ChangeLog NEWS README TODO
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 18 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.5-3mamba
|
||||||
|
- provide directory /var/cache/PackgeKit/downloads
|
||||||
|
- smartBackend.py: patched to raise correct exceptions, hopefully fixes pk lockups on errors
|
||||||
|
|
||||||
|
* Sat Aug 15 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.5-2mamba
|
||||||
|
- rebuilt on itself to fix requirements for mozilla plugin
|
||||||
|
|
||||||
|
* Fri Aug 14 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.5-1mamba
|
||||||
|
- update to 0.9.5
|
||||||
|
|
||||||
* Wed Oct 08 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.17-1mamba
|
* Wed Oct 08 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.17-1mamba
|
||||||
- update to 0.8.17
|
- update to 0.8.17
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user