aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/pk-debconf-helper.patch
diff options
context:
space:
mode:
authorLibravatar Mubashshir <ahm@jadupc.com>2023-08-03 16:33:41 +0600
committerLibravatar Mubashshir <ahm@jadupc.com>2023-08-03 16:33:41 +0600
commit70faa8e9a0ff3cba74b4f753e257d56b768fcbd2 (patch)
tree3a49460715f7319d100e0cc9c1a278758500c7c8 /debian/patches/pk-debconf-helper.patch
downloadaptdaemon-70faa8e9a0ff3cba74b4f753e257d56b768fcbd2.tar.gz
aptdaemon-70faa8e9a0ff3cba74b4f753e257d56b768fcbd2.zip
Import Upstream version 1.1.1+bzr982
Diffstat (limited to 'debian/patches/pk-debconf-helper.patch')
-rw-r--r--debian/patches/pk-debconf-helper.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches/pk-debconf-helper.patch b/debian/patches/pk-debconf-helper.patch
new file mode 100644
index 0000000..9e672c7
--- /dev/null
+++ b/debian/patches/pk-debconf-helper.patch
@@ -0,0 +1,40 @@
+Description: Use PackageKit debconf socket
+Author: Julian Andres Klode <julian.klode@canonical.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1726068
+Last-Update: 2019-05-24 <YYYY-MM-DD, last update of the meta-information, optional>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/aptdaemon/client.py
++++ b/aptdaemon/client.py
+@@ -888,6 +888,16 @@ class AptTransaction(GObject.Object):
+ _reply_handler = lambda: reply_handler(self)
+ else:
+ _reply_handler = None
++
++ pk_socket = "/run/user/%d/pk-debconf-socket" % os.getuid()
++ if os.path.exists(pk_socket):
++ self._proxy.Set("org.debian.apt.transaction", "DebconfSocket",
++ pk_socket,
++ dbus_interface=dbus.PROPERTIES_IFACE,
++ reply_handler=_reply_handler,
++ error_handler=error_handler)
++ return
++
+ self._debconf_helper = debconf.DebconfProxy(frontend)
+ self._proxy.Set("org.debian.apt.transaction", "DebconfSocket",
+ self._debconf_helper.socket_path,
+--- a/aptdaemon/core.py
++++ b/aptdaemon/core.py
+@@ -368,7 +368,11 @@ class Transaction(DBusObject):
+ self.pid = pid
+ self.http_proxy = dbus.String("")
+ self.terminal = dbus.String("")
+- self.debconf = dbus.String("")
++ pk_socket = "/run/user/%d/pk-debconf-socket" % self.uid
++ if os.path.exists(pk_socket):
++ self.debconf = dbus.String(pk_socket)
++ else:
++ self.debconf = dbus.String("")
+ self.kwargs = kwargs
+ self._translation = None
+ # The transaction which should be executed after this one