Skip to content

Commit

Permalink
Remove CPDB backend info file (#26)
Browse files Browse the repository at this point in the history
The frontend libraries now use only the D-Bus to find available backends. This makes sure that everything works also if the frontend and/or any of the backends are installed via sanboxed packaging (like Snap for example) where the components cannot read each other's file systems.
  • Loading branch information
TinyTrebuchet authored Aug 2, 2023
1 parent b930eb8 commit 036953b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 14 deletions.
7 changes: 0 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ PKG_CHECK_VAR([DBUS_SERVICES_DIR], [dbus-1], [session_bus_services_dir],
AC_MSG_FAILURE([cannot locate session_bus_services_dir])
)

# The info directory which will be read by the frontend
AC_MSG_CHECKING([CPDB backend info path])
PKG_CHECK_VAR([INFO_DIR], [cpdb], [cpdb_backend_info_dir],
AC_MSG_RESULT($INFO_DIR),
AC_MSG_FAILURE([cannot locate cpdb_backend_info_dir])
)

# The directory for the backend executables
AC_MSG_CHECKING([CPDB backend executables path])
PKG_CHECK_VAR([CPDB_BACKEND_DIR], [cpdb], [cpdb_backend_exec_dir],
Expand Down
4 changes: 0 additions & 4 deletions data/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
EXTRA_DIST = \
org.cups.cupsd.Notifier.xml \
org.openprinting.Backend.CUPS \
org.openprinting.Backend.CUPS.service.in

# Dbus service file
Expand All @@ -11,8 +10,5 @@ service_DATA = $(service_in_files:.service.in=.service)
$(service_DATA): $(service_in_files) Makefile
@sed -e "s|\@cpdb_backend_dir\@|$(CPDB_BACKEND_DIR)|" $<> $@

info_backenddir = $(INFO_DIR)
info_backend_DATA = org.openprinting.Backend.CUPS

clean-local:
rm -rf $(service_DATA)
1 change: 0 additions & 1 deletion data/org.openprinting.Backend.CUPS

This file was deleted.

3 changes: 1 addition & 2 deletions src/print_backend_cups.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#define _CUPS_NO_DEPRECATED 1
#define BUS_NAME "org.openprinting.Backend.CUPS"
#define OBJECT_PATH "/"

static void
on_name_acquired(GDBusConnection *connection,
Expand Down Expand Up @@ -164,7 +163,7 @@ on_name_acquired(GDBusConnection *connection,
b->dbus_connection = connection;
b->skeleton = print_backend_skeleton_new();
connect_to_signals();
connect_to_dbus(b, OBJECT_PATH);
connect_to_dbus(b, CPDB_BACKEND_OBJ_PATH);
}

static gboolean on_handle_get_printer_list(PrintBackend *interface,
Expand Down

0 comments on commit 036953b

Please sign in to comment.